Пример #1
0
 public DataBaseService(string type, string connectionStr)
 {
     DbType = type;
     switch (type)
     {
         case "SQL":
             DbService = new SQLDbService();
             break;
         case "ACCESS":
             DbService = new OleDbService();
             break;
         case "":
             break;
     }
     DefaultConnection = connectionStr;
 }
Пример #2
0
 /// <summary>
 /// 默认实例化SQL Server
 /// </summary>
 public DataBaseService()
 {
     DbType = StaticData.DefaultDataBaseType;
     DbService = new SQLDbService();
     DefaultConnection = StaticData.DefaultConnection;
 }