1
votes

I have a VB6 app that makes an ADODB connection with the following string:

"Provider=SQLOLEDB;Data Source=MYPC;Initial Catalog=MYDB;User ID=sa;Password=***"

I recently migrated the database from MS-SQL Server 2005 to 2008. Clients can connect with no issue. But on my machine where I have both SQL 2005 and 2008, I am unable to connect. The error on my development machine is: [DBNETLIB][ConnectionOpen (Connect()).] SQL Server does not exist or access denied. I can still connect to MYPC\SQLEXPRESS which is the SQL 2005 instance.

If I set the connection string to the following then it works on my machine:

"Provider=SQLNCLI10;Server=MYPC;Database=MYDB;Uid=sa;Pwd=***"

What do I need to do to get the connection working on my machine with the first connection string? I am assuming that there is something to be done to the database configuration to make this work. The SQL2005 instance is MYPC\SQLEXPRESS while the SQL2008 instance is MYPC.

1
Can the client's connect with your second connection string? And what kind of error are you getting on your machine when you use the first one? - Chris
I have not installed the SQL2008 native client on the user's machines so I would presume that the second connection string would not work. I would like to keep the first string so I can leave the client PCs as is unless there are major drawbacks to doing so. The error on my development machine is: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. - unubar

1 Answers

0
votes

I resolved the issue by installing another instance of SQL Server 2008 on my machine. I named the instance NEWSQL and now I can connect using MYPC\NEWSQL using the first connection string.

I would still like to know if and how I could have connected to the unnamed instance with the first connection string.