January 11, 2011 at 3:22 pm
We have a vendor wrote us a small appliction that used a connection string. Everything works fine on their end.
But when I copy everything to our server, it got the error:
Application Error: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
But the databasename, logins are all correct.
The file is like below:
<configuration>
<appSettings/>
<connectionStrings>
<add name="MyConnString" connectionString="Provider=SQLOLEDB;Server=ourdbServername;Database=OurDBName;User ID=MyUser;Password=Mypassword;Application Name=MyApp;Workstation ID=MylocalComputer;" providerName="System.Data.OleDb"/>
</connectionStrings>
</configuration>
The diffrence between mine and his is he has sql server installed on the same machine, but my has a separate sql server. It has only default instance installed.
I also tested to connect the database from another sql server using the login, I can connect without problem.
Any ideas about the error?
Thanks
January 11, 2011 at 9:23 pm
Server=ourdbServername
Are you sure you providing the correct servername?
User ID=MyUser;Password=Mypassword
Are you able to connect the sql server from SSMS using the mentioned usedid and password?
----------
Ashish
January 11, 2011 at 10:15 pm
Looks like a generic connection string copied from http://www.connectionstring.com.
You need to modify the servername, userid, password etc.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
January 12, 2011 at 7:07 am
Thanks.
I do replace the servername, username etc to ours, in my previous post, I just don't want to expose our private information there.
ON the web server, there is no SSMS installed, so I cannot test the connection. BUt I tested from another sql server to connect by using the username/Password, there is no problem to connect.
Also we have another UI small application on the web server, that used the same connection string, and the application works. The difference is the string in a UI field. But this one is in a config file.
January 12, 2011 at 7:31 am
Find the problem.
The vendor told me to change connection string in the app.config, but there is another config file Myapp.exe.config not changed, by changing it , it works.
Thanks for all the ideas.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply