ConnectionString
有几个参数不清楚,暂时不去深入。
<connectionStrings>
<!-- This connection is inherited from the ASP.NET Quickstart Web.config file Uncomment this section to edit the sample locally <add name="Pubs" connectionString="Server=(local)"SQLExpress;Integrated Security=True;Database=pubs;Persist Security Info=True" providerName="System.Data.SqlClient" />
<add name="Northwind" connectionString="Server=(local)"SQLExpress;Integrated Security=True;Database=Northwind;Persist Security Info=True" providerName="System.Data.SqlClient" />
<add name="Contacts" connectionString="Server=(local)"SQLExpress;Integrated Security=True;Database=Contacts;Persist Security Info=True" providerName="System.Data.SqlClient" />
-->
<add name="NorthwindOLEDB" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Northwind.mdb;" providerName="System.Data.OleDb" />
<add name="ContactsDatabase" connectionString="Data Source=."SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=true;" providerName="System.Data.SqlClient" />
</connectionStrings>
<configuration>
<connectionStrings>
<add name="Pubs" connectionString="Server=(local);Integrated Security=True;Database=pubs;"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
<connectionStrings>
<!-- This connection is inherited from the ASP.NET Quickstart Web.config file Uncomment this section to edit the sample locally <add name="Pubs" connectionString="Server=(local)"SQLExpress;Integrated Security=True;Database=pubs;Persist Security Info=True" providerName="System.Data.SqlClient" />
<add name="Northwind" connectionString="Server=(local)"SQLExpress;Integrated Security=True;Database=Northwind;Persist Security Info=True" providerName="System.Data.SqlClient" />
<add name="Contacts" connectionString="Server=(local)"SQLExpress;Integrated Security=True;Database=Contacts;Persist Security Info=True" providerName="System.Data.SqlClient" />
-->
<add name="NorthwindOLEDB" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Northwind.mdb;" providerName="System.Data.OleDb" />
<add name="ContactsDatabase" connectionString="Data Source=."SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=true;" providerName="System.Data.SqlClient" />
</connectionStrings>
<configuration>
<connectionStrings>
<add name="Pubs" connectionString="Server=(local);Integrated Security=True;Database=pubs;"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>