Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 28th, 2006, 03:35 PM
Registered User
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to connect to a remote SQL Server?

There are two servers, firewalls for them are all disabled
[u]Server A (Website Server):</u>
Windows Server 2003
IIS 6.0

[u]Server B (SQL Server):</u>
Windows Server 2003
MS SQLServer 8.00.194

I try to connect the Server B through an ASP page on Server A, but got the error "Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. "

My code as below:
    Set Conn = Server.CreateObject ("ADODB.Connection")
    Conn.Mode = adModeReadWrite
    Conn.ConnectionString = "Provider = Sqloledb; User ID = username; Password = mypwd; Initial Catalog = OfficeStuff; Data Source = ServerIP;"

Any idea?

Old June 29th, 2006, 05:38 AM
Friend of Wrox
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts

Do you have the credentials or permissions to logon to that computer with the specified account?

Old June 29th, 2006, 06:15 AM
Registered User
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

thanks for help. problem is solved by updating SQL server to SP4. but another problem comes, I tested my code on my own web server in home. I need to upload the website into a virtual webhosting. the tech support told me "you can connect to another MySQL
server from our hosting accounts. Applications that need to make
outgoing connections will need to be made "proxy aware". This will
require additional coding to varying degrees, depending on the
application. The ip of the proxy server is and
connections will be made on port 3128. Http connections are completely
transparent for making only port 80 connections. Please contact us if
you have any further questions."

what does it mean? how should I write the connection string? Many thanks!

Old July 4th, 2006, 01:47 PM
Friend of Wrox
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts

A common problem that happens and gives similar errors to the one your getting is the versions of mdac between them are different. Either through a different service pack, or an application installed on one not installed on the other upgraded the mdac version. Try to get a recent mdac, apply them to both boxes and then insure the installed dll's are the same versions. Then see if you still have the same problem.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to connect to the remote server rstelma ASP.NET 2.0 Professional 0 May 30th, 2008 07:56 PM
Connect to remote SQL Server 2000 using servlets Vinay Bansal Servlets 1 August 5th, 2005 12:22 AM
unable to connect remote server Harendra .NET Web Services 1 April 25th, 2005 02:10 AM
how i can connect to remote sql server db yoord ADO.NET 16 June 16th, 2004 01:40 AM
can't connect to remote server alyeng2000 ASP.NET 1.0 and 1.1 Basics 4 February 9th, 2004 11:24 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.