VS2003中Webconfig里的 数据库链接语句 转到 2005无法使用。?
Public Sub New()
System.Configuration.ConfigurationManager.AppSettings( "connectingstring ").ToString.Trim()
myConn = New SqlConnection(connectingstring)
End Sub
错误提示: 无法找到 connectingstring
怎么办?
2005:
<add name= "connectingstring " connectionString= "Data Source=FOX-START;Initial Catalog=waigua;User ID=sa "
providerName= "System.Data.SqlClient " />
2003:
<add key= "ConnectionString " value= "server=localhost;database=Contract:UID=user;password=user "/>
------解决方案--------------------http://blog.csdn.net/net_lover/archive/2006/10/23/1346700.aspx
------解决方案-------------------- <appSettings>
<add name= "connectingstring " connectionString= "Data Source=FOX-START;Initial Catalog=waigua;User ID=sa "
providerName= "System.Data.SqlClient " />
</appSettings>
------解决方案--------------------05的和03的有区别:
05的是:
connectionString= "Data Source=LEXOPC;Initial Catalog=Northwind;Persist Security Info=True;User ID=cofei;Password=cofei " providerName= "System.Data.SqlClient "