ASP.NET ERROR : Keyword not supported: 'provider'
My app fails at this line of code:
Dim objConnection As New SqlConnection(Application("ConnString"))
My connection string is:
"Server=testAITSQL;Database=SSCommerce;UID=PlanoWebApp;PWD=XXXXXXXX;"
I googled this problem and the solution for it was开发者_StackOverflow社区 having a malformed connection string where the "provider" was being specified when it shouldn't have. Example conn string:
Provider=SQLOLEDB.1;Integrated Security=SSPI;DATABASE=APInquiry;SERVER=SqlServer
I'm not specifying the Provider so I think I have a different problem...???
Does your test server have the exact same configuration file as your development machine? I suspect the configuration file on your test machine may have a different set of values for ConnString
than you are expecting.
Provider=xxxx
is not a valid .net connection string token.
You are already implicitly specifying the provider by instantiating a SqlConnection.
Drop the provider pair and you will be golden.
maybe, for sh!7s and giggles, try Application("ConnString").tostring
You are connecting to a SQL Server, right? My ConnString has the following options: Server Database User ID Password
精彩评论