<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"><!--sqlit--> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> </startup> <connectionStrings> <add name="LogConn" connectionString=" Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT = 1521)))(CONNECT_DATA =(SID = DataBaseName)));User ID=sa;password=123456"/> <add name="Conn" connectionString="Data Source=C:\Users\Administrator\Desktop\DataBase\Database.db;failifmissing=false"/> <!--<add name="LogConn" connectionString="server=.;database=Prmeasure;uid=sa;pwd=tjh" providerName="System.Data.SqlClient"/>--> <!--<add name="Conn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0}App_Data/test.mdb"/>--> <add name="ACCConn" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Administrator\Desktop\DataBase\LocalDatabase.mdb" providerName="System.Data.OleDb"/> <!--<add name="LogConn" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0}App_Data/test.mdb" providerName="System.Data.OleDb"/>--> <!--<add name="Conn" connectionString="Txt Path={0}"/> <add name="LogConn" connectionString="Txt Path={0}"/>--> <!--<add name="Conn" connectionString="Data Source=C:\Users\Administrator\Desktop\DataBase\2017090904.db;failifmissing=false;"/>--> </connectionStrings> </configuration>
原文:http://www.cnblogs.com/jianhongtang2016/p/7806967.html