Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Can't connect to SQL Server with Network Library

Author  Topic 

goblinland
Starting Member

6 Posts

Posted - 2006-04-04 : 04:17:37
Dear Good Team,
I have MS SQL Server 2000 installed on MS Windows XP to use as a database server(compB) and a web server(compA) (on the different computer).
In ASP page i cannot use the following connection string to connect to the database server:
'* set your variables here
serverIP = "192.168.0.26"
serverPORT = "1433" '* default port is 1433/TCP
serverDB = "icon1"
serverLOGIN = "IUSR_DAVID"
serverPASSWORD = "123"

'* open connection

Set con = Server.CreateObject("ADODB.Connection")
con.ConnectionString = "Provider=SQLOLEDB.1;" &_
"Server="& serverIP&";" & _
"Address="& serverIP&","& serverPORT &";" & _
"Initial Catalog=" & serverDB & ";" &_
"User ID=" & serverLOGIN & ";" &_
"Network Library=DBNETLIB;" & _
"Password = 123;"

and i receive the error message:

Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

but when i connect from compA to compB and comp B to compA with SQL enterprise manager they connect normally.

is it something wrong with my script or i must set something else (like client network utility maybe) in SQL Server (everthing is standard i havent touch anything in SQL server setting except making user id for compA to access compB)

Please reply ...........
Thank you for your help very much.
   

- Advertisement -