コード例 #1
0
 public InformixConnectionWrapper(String connectionString, GxConnectionCache connCache, IsolationLevel isolationLevel)
 {
     try
     {
         _connection       = (IDbConnection)ClassLoader.CreateInstance(GxInformix.IfxAssembly, "IBM.Data.Informix.IfxConnection", new object[] { connectionString });
         m_isolationLevel  = isolationLevel;
         m_connectionCache = connCache;
     }
     catch (Exception ex)
     {
         GXLogging.Error(log, "Informix data provider Ctr error " + ex.Message + ex.StackTrace);
         throw ex;
     }
 }
コード例 #2
0
 public PostgresqlConnectionWrapper(String connectionString, GxConnectionCache connCache, IsolationLevel isolationLevel)
 {
     try
     {
         _connection       = (IDbConnection)ClassLoader.CreateInstance(GxPostgreSql.NpgsqlAssembly, "Npgsql.NpgsqlConnection", new object[] { connectionString });
         m_isolationLevel  = isolationLevel;
         m_connectionCache = connCache;
     }
     catch (Exception ex)
     {
         GXLogging.Error(log, "Npgsql data provider Ctr error " + ex.Message + ex.StackTrace);
         throw ex;
     }
 }
コード例 #3
0
 public ServiceConnectionWrapper(Type runtimeClassType, String connectionString, GxConnectionCache connCache, IsolationLevel isolationLevel, String dataSource)
 {
     try
     {
         _connection = (IDbConnection)Activator.CreateInstance(runtimeClassType);
         if (_connection is IServiceConnection)
         {
             (_connection as IServiceConnection).DataSource = dataSource;
         }
         ClassLoader.SetPropValue(_connection, "ConnectionString", connectionString);
         m_isolationLevel  = isolationLevel;
         m_connectionCache = connCache;
     }
     catch (Exception ex)
     {
         GXLogging.Error(log, "Service data provider Ctr error " + ex.Message + ex.StackTrace);
         throw ex;
     }
 }
コード例 #4
0
 public SQLiteConnectionWrapper(String connectionString, GxConnectionCache connCache, IsolationLevel isolationLevel)
     : base(new SQLiteConnection(connectionString), isolationLevel)
 {
     m_connectionCache = connCache;
 }
コード例 #5
0
        public override GxAbstractConnectionWrapper GetConnection(bool showPrompt, string datasourceName, string userId,
                                                                  string userPassword, string databaseName, string port, string schema, string extra, GxConnectionCache connectionCache)
        {
            if (m_connectionString == null)
            {
                m_connectionString = BuildConnectionString(datasourceName, userId, userPassword, databaseName, port, schema, extra);
            }
            GXLogging.Debug(log, "Setting connectionString property ", ConnectionStringForLog);
            SQLiteConnectionWrapper connection = new SQLiteConnectionWrapper(m_connectionString, connectionCache, isolationLevel);

            m_FailedConnections = 0;
            return(connection);
        }
コード例 #6
0
        public override GxAbstractConnectionWrapper GetConnection(bool showPrompt, string datasourceName, string userId,
                                                                  string userPassword, string databaseName, string port, string schema, string extra, GxConnectionCache connectionCache)
        {
            if (string.IsNullOrEmpty(m_connectionString))
            {
                m_connectionString = BuildConnectionString(datasourceName, userId, userPassword, databaseName, port, schema, extra);
            }
            GXLogging.Debug(log, "Setting connectionString property ", ConnectionStringForLog);

            return(new ServiceConnectionWrapper(m_ServiceType, m_connectionString, connectionCache, isolationLevel, DataSource));
        }
コード例 #7
0
 public MySqlDriverCSConnectionWrapper(String connectionString, GxConnectionCache connCache, IsolationLevel isolationLevel) : base(new MySQLConnection(connectionString), isolationLevel)
 {
     m_connectionCache = connCache;
 }