public abstract ChangeDatabase ( string databaseName ) : void | ||
databaseName | string | |
Результат | void |
/// <summary> /// Changes database in database connection /// </summary> /// <param name="connection"> /// Opened database connection /// </param> /// <param name="databaseName"> /// The database Name. /// </param> public virtual void SwitchDatabase(DbConnection connection, string databaseName) { connection.ChangeDatabase(databaseName); }
private void CheckAndEstablishReadConnection() { if (readDBConn == null) { readDBConn = new NpgsqlConnection(ConnectionString); readDBConn.Open(); readDBConn.ChangeDatabase(myConfig.Database); } }