Link to home
Start Free TrialLog in
Avatar of scprogs
scprogsFlag for United States of America

asked on

SQL Server 2000 connection problem

I've been tasked with installing an old program on a client's computer that connects to a SQL Server 2000 database. The connection string is hard-coded in the program as follows:
Provider=SQLOLEDB.1;User ID=sa;Password=vbs;Initial Catalog=Boxlabeler;Data Source=localhost
I've tried this connection string in a udl file, but when I try to test the connection, I get the error,
Test connection failed because of an error in initializing provider. [DBNETLIB][ConnectionOpen (Connect()).] SQL Server does not exist or access denied.
.
When the server name in the udl file is changed from "localhost" to the name of the PC, it is able to connect. I would rather make this work without changing the connection string or upgrading the SQL instance, as I'm not sure how the end-user is connecting to it remotely. What do I have to do to make it work with the server name as "localhost"?
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

you could try to use 127.0.0.1 instead of localhost....
ASKER CERTIFIED SOLUTION
Avatar of Seaton007
Seaton007
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scprogs

ASKER

Thanks, Seaton. Those links were helpful. I had seen mention before of a network utility for SQL Server 2000, but I had a hard time finding it. It's called SVRNETCN.exe and can be found in C:\Program Files\Microsoft SQL Server\80\Tools\Binn. There, I enabled Named Pipes and TCP/IP and that took care of it.