private void InitializeAdoBase(DataBaseType dbType, string connStr) { switch (dbType) { case DataBaseType.SqlServer: { this.adoBase = new SqlADOBase(connStr); break; } case DataBaseType.Ole: { this.adoBase = new OleADOBase(connStr); break; } case DataBaseType.Oracle: { this.adoBase = new OracleADOBase(connStr); break; } default: { throw new Exception("The target DataBaseType is not implemented !"); } } }
public void Initialize(IDBAccesser accesser, int page_Size, string whereStr, string[] fields) { this.theParas = new DataPaginationParas(accesser.ConnectString, accesser.DbTableName, whereStr); this.theParas.Fields = fields; this.theParas.PageSize = page_Size; this.fieldStrs = this.theParas.GetFiedString(); this.adoBase = new SqlADOBase(this.theParas.ConnectString); }
public void Initialize(DataPaginationParas paras) { this.theParas = paras; this.fieldStrs = this.theParas.GetFiedString(); this.adoBase = new SqlADOBase(this.theParas.ConnectString); }
public void Initialize(string connStr, DataBaseType dbType) { this.connectionStr = connStr; this.dbEleFactory = DbElementFactoryGetter.GetDBTypeElementFactory(dbType); this.adoBase = this.dbEleFactory.GetADOBase(connStr); }