SqlConnection conn = new SqlConnection("server=(local)\\NetSDK;database=pubs;Integrated Security=SSPI");
SqlConnection conn = new SqlConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=Northwind;");
SqlConnection conn = new SqlConnection("Persist Security Info=False;Integrated Security=SSPI;database=northwind;server=myserver");
SqlConnection conn = new SqlConnection( "uid=sa;pwd=passwords;initial catalog=pubs;data source=127.0.0.1;Connect Timeout=900");
SqlConnection conn = new SqlConnection( "server=localhost,1569;uid=sa;pwd=123;database=mydatabase;Connect Timeout=900");
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Data\test.mdb");
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Password=123;User ID=Admin;Data Source=test.mdb;");
OleDbConnection conn = new OleDbConnection("Provider=SQLOLEDB;Data Source=MySQLServer;Integrated Security=SSPI");
文章出处:飞诺网(www.diybl.com):http://www.diybl.com/course/4_webprogram/asp.net/netjs/200869/123972.html