<add key="ConnectionStrings" value="data source =(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))); user=SYSTEM; password=123;" />
<add name="ApplicationServices" connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
new SqlConnection("server=LJM\MSSQL2005;database=MySchool;uid=sa;pwd=123456")
//连接Access数据库
new OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;data source=student.mdb;persist security info=false")
new MySqlConnection("server=LJM\MSSQL2005;database=MySchool;uid=sa;pwd=123456")
new OracleConnection("Data Source=Oracle8i;Integrated Security=yes")
new SqlConnection("server=(local)\sqlexpress;database=Mybookshop;uid=sa;pwd=1234")
new OleDbConnection(@"Provider=Microsoft.Jet.OleDb.4.0;Data Source=books.mdb")
<add name="sql" connectionString="Data Source=.;Initial CataLog=DBLQBZ;Integrated Security=true;"/>
<add name="sql" connectionString="Data Source=127.0.0.1;Initial Catalog=test;User Id=sa;Password=123;"/>
new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=C:DBMySchool.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True")
//定义连接加密ACCESS数据库的字符串 string strFilePath = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + Path + "\DB_Test.mdb;Jet OLEDB:Database Password=123456";