Esempio n. 1
0
        private static DBInfo GetDBInfo(string type)
        {
            DBInfo dbInfo = new DBInfo();

            if (type == "Oracle")
            {
                dbInfo.Connstring = "";
                dbInfo.DataSource = "";
                dbInfo.DBName     = "inputdbtest";
                dbInfo.UserID     = "inputadmin";
                dbInfo.Password   = "******";
                dbInfo.DBType     = DBType.Oracle;
            }
            else
            {
                dbInfo.Connstring = "";
                dbInfo.DataSource = ".";
                dbInfo.DBName     = "test";
                dbInfo.UserID     = "sa";
                dbInfo.Password   = "******";
                dbInfo.DBType     = DBType.SQLServer;
            }

            return(dbInfo);
        }
Esempio n. 2
0
 public DbOpearte(string dbtype)
 {
     //实例化数据库访问类
     SourceDBInfo     = GetDBInfo(dbtype);
     acc              = _GenearlSourDBAcc();
     acc.OnException += new DataAccess.ExceptionHandler(OnException);
 }