Beispiel #1
0
        public OracleDBPoolUtil()
        {
            DBPools = new Dictionary <string, OleExecPool>();
            ConnectionManager.Init();
            String      sfcConnectString = ConnectionManager.GetConnString("SFCORACLEDB");
            OleExecPool sfcPool          = new OleExecPool(sfcConnectString);

            DBPools.Add("SFCDB", sfcPool);
        }
Beispiel #2
0
 /// <summary>
 /// 構造一個OleExec對象,該對象用於執行SQL語句等任務
 /// </summary>
 /// <param name="strConn"></param>
 public OleExec(string strConn, OleExecPool _Pool)
 {
     _connStr = strConn;
     _conn    = new OleDbConnection(_connStr);
     _conn.Open();
     _comm = new OleDbCommand();
     _adp  = new OleDbDataAdapter(_comm);
     Pool  = _Pool;
 }
Beispiel #3
0
 /// <summary>
 /// 構造一個OleExec對象,該對象用於執行SQL語句等任務
 /// </summary>
 /// <param name="strConn"></param>
 public OleExec(string strConn, OleExecPool _Pool)
 {
     _connStr = strConn;
     //_conn = new OleDbConnection(_connStr);
     //_conn.Open();
     //_comm = new OleDbCommand();
     //_adp = new OleDbDataAdapter(_comm);
     db = new SqlSugarClient(new ConnectionConfig()
     {
         ConnectionString      = _connStr,
         DbType                = SqlSugar.DbType.Oracle,
         IsAutoCloseConnection = false,
         InitKeyType           = InitKeyType.Attribute
     });
     db.Open();
     Pool = _Pool;
 }