以下代码配置在App.config中 <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> </configSections> <connectionStrings> //Data Source路径是在debug下 <add name="ProcessSoftware.Properties.Settings.ProcessSoftwareConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Data/ProcessSoftware.mdb" providerName="System.Data.OleDb" /> <add name="MysqlConnectionString" connectionString="Server=localhost;Database=rsda;Uid=root;Pwd=root;CharSet=utf8" providerName="MySQLProv" /> </connectionStrings> <appSettings> <add key="replace" value="bin\Debug\"/> </appSettings> <startup> <supportedRuntime version="v2.0.50727"/></startup> </configuration>
?
原文:http://ruohanfly.iteye.com/blog/2269969