示例#1
0
        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 !");
            }
            }
        }
示例#2
0
        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);
        }
示例#3
0
 public void Initialize(DataPaginationParas paras)
 {
     this.theParas  = paras;
     this.fieldStrs = this.theParas.GetFiedString();
     this.adoBase   = new SqlADOBase(this.theParas.ConnectString);
 }
示例#4
0
 public void Initialize(string connStr, DataBaseType dbType)
 {
     this.connectionStr = connStr;
     this.dbEleFactory  = DbElementFactoryGetter.GetDBTypeElementFactory(dbType);
     this.adoBase       = this.dbEleFactory.GetADOBase(connStr);
 }