發布時間:2020-08-07 05:08 作者:獨孤劍 閱讀:2231
// SqlServer-Windows Authentication string connectionString = "Data Source=127.0.0.1,1433;Initial Catalog=TestDB;connect timeout=10;Integrated Security=True"; // SqlServer-Account & Password string connectionString = "Data Source=127.0.0.1,1433;Initial Catalog=TestDB;uid=sa;pwd=123456"; // MySql-Account & Password string connectionString = "server=127.0.0.1;port=3306;database=TestDB;charset=utf8;user id=root;password=123456;pooling=false;"; // Oracle-Account & Password string connectionString = "Data Source=(DESCRIPTION=(ADDRESS =(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1522))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TestDB)));User Id=scott;Password=123456"; // Access-connect mdb string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "\\Test.mdb" + ";Jet OLEDB:Database Password=123456;Persist Security Info=False"; // Access-connect accdb string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Application.StartupPath + "\\Test.accdb" + ";Jet OLEDB:Database Password=123456;Persist Security Info=False"; // Access-connect mdb - ASP.NET(App_Data) string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"|DataDirectory|\\TestDB.mdb\";Jet OLEDB:database password=987654321;Persist Security Info=False"; // Access-connect accdb - ASP.NET(App_Data) string connectionString = "Provider=Microsoft.Jet.OLEDB.12.0;Data Source=\"|DataDirectory|\\TestDB.accdb\";Jet OLEDB:database password=987654321;Persist Security Info=False"; // Access-connect mdb - ASP.NET string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + System.Web.HttpContext.Current.Server.MapPath("~//Test.mdb") + ";Jet OLEDB:Database Password=123456;Persist Security Info=False"; // Access-connect accdb - ASP.NET string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + System.Web.HttpContext.Current.Server.MapPath("~//Test.accdb") + ";Jet OLEDB:Database Password=123456;Persist Security Info=False";
微信打賞, 微信掃一掃
支付寶打賞, 支付寶掃一掃
如果文章對您有幫助,歡迎給作者打賞