예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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);
        }