Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 28th, 2006, 03:35 PM
Registered User
 
Join Date: Oct 2003
Location: , , .
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;"
    Conn.Open

Any idea?


Reply With Quote
  #2 (permalink)  
Old June 29th, 2006, 05:38 AM
Friend of Wrox
 
Join Date: May 2006
Location: Helsingborg, , Sweden.
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #3 (permalink)  
Old June 29th, 2006, 06:15 AM
Registered User
 
Join Date: Oct 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 64.202.165.130 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!

Reply With Quote
  #4 (permalink)  
Old July 4th, 2006, 01:47 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: Orange County, CA, USA.
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.