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; } }
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; } }
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; } }
public SQLiteConnectionWrapper(String connectionString, GxConnectionCache connCache, IsolationLevel isolationLevel) : base(new SQLiteConnection(connectionString), isolationLevel) { m_connectionCache = connCache; }
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); }
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)); }
public MySqlDriverCSConnectionWrapper(String connectionString, GxConnectionCache connCache, IsolationLevel isolationLevel) : base(new MySQLConnection(connectionString), isolationLevel) { m_connectionCache = connCache; }