/// <summary> /// Select server type /// </summary> /// <param name="typeServeur"></param> public void selectServerType(TYPE_SERVEUR typeServeur) { switch (typeServeur) { case TYPE_SERVEUR.MYSQL: _myConnection = new connectMySQL(); break; case TYPE_SERVEUR.SQLSERVER: _myConnection = new connectSQLServer(); break; case TYPE_SERVEUR.ODBC: _myConnection = new connectODBC(); break; case TYPE_SERVEUR.OLEDB: _myConnection = new connectOleDb(); break; case TYPE_SERVEUR.ORACLE: _myConnection = new connectOracle(); break; case TYPE_SERVEUR.POSTGRESQL: _myConnection = new connectPostgreSQL(); break; case TYPE_SERVEUR.SQLITE: _myConnection = new connectSQLite(); break; default: throw new Exception("Unknown database server type"); } }
public connectDB(TYPE_SERVEUR typeServeur) { selectServerType(typeServeur); }