示例#1
0
        public static SqlConnection GetDBConnection()
        {
            string datasource = @"DESKTOP-RPK6PAD\SQLEXPRESS";

            string database = "QuanLyNhaHang";
            string username = "******";
            string password = "******";

            return(DBSQLServerUtils.GetDBConnection(datasource, database, username, password));
        }
示例#2
0
        public static SqlConnection GetDBConnection()
        {
            string datasource = @"(localdb)\MSSQLLocalDB";

            string database = "Northwind";
            string username = "";
            string password = "";

            return(DBSQLServerUtils.GetDBConnection(datasource, database, username, password));
        }
示例#3
0
        public static SqlConnection GetDBConnection()
        {
            string datasource = @"ADMINISTRATOR\SQLEXPRESS";

            string database = "OnlineTeachingDB";
            string username = "******";
            string password = "******";

            return(DBSQLServerUtils.GetDBConnection(datasource, database, username, password));
        }
示例#4
0
        public static SqlConnection GetDBConnection()
        {
            string datasource = @"KELVIN\SQLEXPRESS";

            string database = "TestDB";
            string username = "******";
            string password = "******";

            return(DBSQLServerUtils.GetDBConnection(datasource, database, username, password));
        }
示例#5
0
        public static SqlConnection GetDBConnection()
        {
            string datasource = @"DESKTOP-595V239\SQL";

            string database = "QLNhaHang";
            string username = "******";
            string password = "******";

            return(DBSQLServerUtils.GetDBConnection(datasource, database, username, password));
        }
示例#6
0
        public static SqlConnection GetDBConnection(string db)
        {
            string datasource = @"10.8.145.155";

            //string database = "WebOnlineCode";
            string username = "******";
            string password = "******";

            return(DBSQLServerUtils.GetDBConnection(datasource, db, username, password));
        }
示例#7
0
        public static SqlConnection GetDBConnection()
        {
            string path = @"resources\databasepath.txt";
            string dbp, s = "";
            int    n = 0;

            using (StreamReader sr = new StreamReader(path))
            {
                dbp = (sr.ReadToEnd());
            }
            n   = dbp.IndexOf(";");
            s   = dbp.Substring(0, n);
            dbp = dbp.Remove(0, n + 1);

            string datasource = @"" + s;
            string database   = dbp;

            // string datasource = @"DESKTOP-588FCHK\SQLEXPRESS";
            // string database = "OutputTableDB";
            //string username = "";
            //string password = "";

            return(DBSQLServerUtils.GetDBConnection(datasource, database));
        }