Sql-server – “SQL Server does not exist or access denied.” upon VB.Net Deployment

sql servervb.netvisual studio 2010

Have built a small VB.Net app in VS2010.

The connection string to the SQL Server is as follows:

    <connectionStrings>
    <add name="IWSR_DataDownloadWizard.My.MySettings.sqlConnection"
        connectionString="Provider=SQLOLEDB.1;Data Source=SQLServer;Integrated Security=SSPI;Initial Catalog=IWSROL"
        providerName="System.Data.OleDb" />
</connectionStrings>

Within the VS2010 environment AND on my machine, the connection works perfectly, however when I deploy to clients I get an error message of:

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

I've tried to search the net for solutions, have seen a few instances of people saying to NOT use the Server Name but the IP Address instead (this doesn't work) and some saying to remove the "Provider=SQLOLEDB.1", again this doesn't work.

Can anyone suggest a solution please?

Further information:

Development System is Windows7 using VS2010
Deployment systems are a combination of Windows XP, Windows 2000 and Windows 7
SQL Server is SQL2000 (soon to be SQL2005).

TIA

Best Answer

OK, here we go:

  • Make sure you have network enabled on SQL Server - it is not enabled by default after install.
  • Do not forget your firewall ;) You may need to put up a firewall exception - this is ALSO not done by SQL Server setup automatically.
  • Sure you are not playing with IpSec? ;) Just asking - can make network connections disappear.

This is NOT an authentication error - it is a "server not reached" error. Access Denied on SQL level has a different error. THis is "server connection can not be established".

On top:

    connectionString="Provider=SQLOLEDB.1;Data

Source=SQLServer;Integrated Security=SSPI;Initial Catalog=IWSROL" providerName="System.Data.OleDb" />

BAD idea. Why the heck do you use the OleDb interface here instead of the SQL Server native client? You really like wasting resources, or is there a real reason?

Related Topic