public SQLServerBase(BLL.ConnectionStringHelper connectionString) { _sqlServerString = connectionString; _serverName = connectionString.ServerName; _databaseName = connectionString.DatabaseName; _login = connectionString.UserName; _password = connectionString.Password; _sqlServer.Connect(_serverName, _login, _password); if (_databaseName != "") { _database = (SQLDMO.Database)_sqlServer.Databases.Item(_databaseName, _sqlServer); } }
private void SQLObject_Load(object sender, EventArgs e) { //Create a Server instance SQLServer server = new SQLServer(); //Create a Database instance SQLDMO.Database dBase = new SQLDMO.Database(); RemplirSQLServers(); if (File.Exists(fichierresult)) { File.Delete("fichierresult"); } File.Create(fichierresult); }