Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft OLE DB Provider for SQL Server error 80004005

Status
Not open for further replies.
Dec 6, 2002
2
GB
Hi there

Error is ....

Microsoft OLE DB Provider for SQL Server error 80004005
[DBNMPNTW]ConnectionOpen (CreateFile()).

An Intranet IIS 4 server on Windows NT makes an asp request to a Windows 2000 server with SQL 7 Server as the default instance - this connection works fine with the following code ....

myConnection.Open "Provider=sqloledb;" & _
"Data Source=dataserver;" & _
"Initial Catalog=pubs;" & _
"User Id=sa;" & _
"Password=*****"

The same Windows 2000 server also has loaded a SQL 2000 Server as a named instance - this code dosn't connect ...

myConnection.Open "Provider=sqloledb;" & _
"Data Source=dataserver\dataserver2000;" & _
"Initial Catalog=pubs;" & _
"User Id=sa;" & _
"Password=*****"

Both TCPIP and named pipes are listed as supported protocols for both the instances. The client machine has MDAC 2.6 installed.

Any idea how to connect to the named instance of the SQL 2000 Server ?

How can you connect directly useing the TCPIP protocol to a named instance of SQL Server?


Thanks
 
I think that the slash is wrong between the server name and the Instance name:

"Data Source=dataserver\dataserver2000;" & _

I believe tat the back-slash should be a front-slash like this:

"Data Source=dataserver/dataserver2000;" & _
 
Hi
Thanks for the answer - I had already tried the slash both ways without success. The Microsoft documentation gives <computername>\<instancename>

And I now notice that it says that
'applications must use SQL Server 2000 client components to connect to a named instance'

This is where the problem was - if the call is made via a NT 4 / IIS 4 box to a named instance then the code fails but if the call is made via a 2000 / IIS 5 box then the code works fine !

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top