Wednesday, March 7, 2012

Connecting to a remote OLE DB

Hey, all. I've mainly worked with MySQL databases before. I'm working on an (old) ASP page that uses this connection string:

strConnect ="Provider=SQLOLEDB; Data Source=SQL1.MYDBSERVER.NET; Initial Catalog=...; User ID=...; Password=..."
It works fine on the production server, but the local copy fails if I try to access the Products page (which uses the database), with this error:
Microsoft OLE DB Providerfor SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/html/products.asp, line 19

Similarly, if I plug the connection info into Tools/Connect to Database in Visual Studio, I get:

Connection failed:
SQLState:'08001'SQL Server Error: 17[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied.

Am I doing something wrong? Do I need more info from the hosting provider to connect remotely? Or is the database not accepting remote connections at all?

Thanks in advance for your help!

It might be that you do not have permission to access it or it might be that database is old (version 7.0) and that you cannot connect from Management studio. Check it with hosting provider.

No comments:

Post a Comment