SQL 2000 Named Instance Issue
Hello, can anyone help with this question? I have a SQL Server 2000 machine with both a default (SQL4) and named instance(SQL4\CONTROL). They are both running in mixed mode, and the named instance is set up with TCP enabled (along with named pipes) on port 1434, while the default is still on 1433. Here's the problem - I can access the named instance perfectly through Enterprise Manager, Query Analyzer, etc, but when I try to connect to it through any .ASP page I get the default instance! For example, if I use a database in the connection string that is also in the default instance, such as a system db, then the page works. If I try to connect with a DB in the connectin string that is only in the named instance, then I get the following error:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Cannot open database requested in login 'LogHB'. Login fails.
/MDF_Prod_Rprts/Test.asp, line 31
Here's the connection string I'm using, which I know works, because I use it in all my pages:
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''
Dim cn
'Create a connection object
Set cn = Server.CreateObject("ADODB.Connection")
'Connect using the OLE DB provider for SQL Server - SQLOLEDB
cn.ConnectionString = "PROVIDER=SQLOLEDB" & _
";SERVER=*******" & _
";UID=******" & _
";PWD=*******" & _
";Trusted_Connection=True" & _
";DATABASE=LogHB"
cn.ConnectionTimeout = 120
cn.Open
Set rs = Server.CreateObject("ADODB.Recordset")
' Associate the Recordset with the open connection
rs.ActiveConnection = cn
' Associate the Recordset with the open connection
rs.ActiveConnection = cn
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''
Why won't the .ASP page recognize the named instance...???
Thanks in advance for any help