Beispiel #1
0
        public Boolean ConnectDataBaseThread()
        {
            Boolean   connectionResult = false;
            Passwords passwords        = new Passwords();

            try
            {
                String DBLogin    = passwords.GetInstanceUserName();
                String DBPassword = passwords.GetInstancePassword();
                String DBInstance = passwords.GetInstanceName();
                String DBName     = passwords.GetDataBaseName();

                DBConnectionThread = new SqlConnection(@"user id=" + DBLogin + "; password="******"; Data Source=" + DBInstance + "; Initial Catalog=" + DBName + ";");
                connectionResult   = true;
            }
            catch (Exception) { }

            return(connectionResult);
        }