Hi,
I have developed a small application using VB6 on Windows XP. Following is the code snapshot. I have added Microsoft ActiveX Data Objects 2.1 Library through Project Reference for ADODB Connection.
Public con As New ADODB.Connection
Public Sub Main()
Set con = Nothing
With con
.CursorLocation = adUseClient
.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=SCMSUG;Data Source=Admin\local"
.Open
End With
End Sub
I tried above code for connecting to a remote SQL Server database on LAN. But it is giving me the following error
Run-time error'-2147467259 (80004005)':
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied.
Any Suggestions

SQL Server does not exist or access denied
yaarit
-Ryan / Kardax
haibing
nickicha
I replaced my Data Source from "Data Source=DSN" to "Data Source =(local)" and it worked like a charm!
My string is:
ConstantName = "Provider=SQLOLEDB;Data Source=(local);Initial Catalog=DatabaseName;Integrated Security=SSPI"
Michael Baarz
WSOpenADOConn([DBNETLIB][ConnectionOpen(Connection()).]SQL Server does not exist or access denied.
eric8910
My Computer name is admin. SQL server group name is ACM and Database name is SCMSUG.
What should be the connection string. i am using ADODB.connection for database connectivity.
Reply ,
Thanks in advance.
tomk_vsts_user
SergioTorres
<add key="Servername" value="localhost"
with
<add key="Servername" value=""
worked like a beauty!!!!!
tc1109
I have XP pro SP2 and all fixes
Zone labs integrity client (All SQL items are trusted)
Symantic AV
I open up Visual Studio.net 2003 to the Server Explorer
When I installed MSDE i was told (by the error that came up when I didnt put it in)
setup.exe sapwd=abc123 'I created just a simple password
I navigate to the following server
HOMEPC\AMS
When I click on the (+) it prompts me for SQL Server Logon and password
I put in the password (default was already in logon field) and got the error message
'SQL Server does not exist or access denied'
I have also tried numerous other passwords, no password, starting the SQLAGENT. I am new to SQL Server (havent learned it yet, trying to learn VB.NET first)
mdegi
Are you trying to connect to the MSDE 2000 instance locally or remotely
In an effort to provide customers with more secure products, Microsoft Windows Server 2003 supports MSDE 2000 with SP3 or later. Find more information here:
http://www.microsoft.com/sql/howtobuy/windowsnetsupport.mspx
You can find further information on how to configure your SQL Server to be accessible over the network by enabling TCP, in Microsoft KB Article 841252.
Hope this helps.
Infiniti
I am also getting this error message. I am trying to connect from a remote pc using oledb connection. I havent checked if a firewall is on. but is there is a firewall do i have to disable it is there any way i can access the server without disabling the firewall thank you.
droby10
I think you can use Data Source=(local) if you are tring to connect to a server on the same machine
or Data Source=Admin if you are tring from anywhere (including the same machine)
joan leon
"Provider=SQLOLEDB;Data Source=xxx;UID=xxx;PWD=xxx;Database=xxx;"
And fixed it by using:
"OLE DB Services=-2;DRIVER={SQLServer};Data Source=xxx;UID=xxx;PWD=xxx;Database=xxx;"
E_l_i
This sounds crazy but it work for my setup.
Sunil Pillappa
I had to install SQL Server Service Pack 3a to resolve my problem with the 'SQL Server does not exist or access denied' error message.
Wayne