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?
|