I have A PC - Win 7 with Microsoft SQL Server Management Studio - 10.0.1600.22 ((SQL_PreRelease).080709-1414 )
Microsoft Data Access Components (MDAC) - 6.1.7600.16385 (win7_rtm.090713-1255)
Microsoft MSXML - 3.0 4.0 5.0 6.0
Microsoft Internet Explorer - 8.0.7600.16385
Microsoft .NET Framework - 2.0.50727.4952
Operating System - 6.1.7600
A laptop Vista and similar Microsoft SQL Server Management Studio.
Both use the following Connection.asp:
A typical script looks like this:Code:<% Option Explicit Dim oConn Set oConn = Server.CreateObject("ADODB.Connection") oConn.ConnectionString = "Provider=SQLNCLI10;Server=HAL\SQL;Database=hub;Trusted_Connection=No;User ID=hub_user;Password=hubuser;" %>
This is a working script.Code:<%@LANGUAGE=VBSCRIPT%><% ' Get_First.asp ' Return first record in table %> <!-- #include file="Connection.asp" --> <% Response.Expires = -1 On Error Resume Next Dim dataArray, dataString, dbField, oRS1, stringSent stringSent = Request.QueryString("stringSent") stringSent = "*|App_Configuration|ID" Set oRS1 = Server.CreateObject("ADODB.Recordset") oRS1.Open "SELECT * FROM App_Configuration ORDER BY ID" , oConn & "\", 3,3Response.Write "&recordCount="& oRS1.RecordCount If oRS1.RecordCount > 0 Then For Each dbField In oRS1.Fields dataString = dataString & dbField.Value & "|" Next End If If Err.Number = 0 Then Response.Write "&dataString="& dataString Response.Write "&appCode=0" Else Response.Write "&appCode=1" Response.Write "&codeError=" & Err.Number Response.Write "&codeDescription=" & Err.description End If oRS1.Close Set oRS1 = Nothing 'oConn.Close Set oConn = Nothing %>
Now .. still with me?? The NON working machine is a server running:
Microsoft SQL Server Management Studio - 10.0.1600.22 ((SQL_PreRelease).080709-1414 )
Microsoft Data Access Components (MDAC) - 00.085.1132.00 (xpsp.080413-0852)
Microsoft MSXML - 2.6 3.0 6.0
Microsoft Internet Explorer - 8.0.6001.18702
Microsoft .NET Framework - 2.0.50727.3615
Operating System - 5.1.2600
I can open Microsoft SQL Server Management Studio and look at the database. What I can't do is connect through asp to it.
I get the following error message:
Error Type:
Microsoft SQL Server Native Client 10.0 (0x80040E4D)
Login failed for user 'hub_user'.
Here's the connection string:
The error I get is:Code:<% Option Explicit Dim oConn Set oConn = Server.CreateObject("ADODB.Connection") oConn.ConnectionString = "Provider=SQLNCLI10;Server=SJC-MASTER\SQLEXPRESS;Database=hub;Trusted_Connection=No;User ID=hub_user;Password=hub_user;" %>
Error Type:
Microsoft SQL Server Native Client 10.0 (0x80040E4D)
Login failed for user 'hub_user'.
The user is set up with SQL Authentication both at server level and db level.
I have tried ALL day and most of the night, with every connection string variation I can think of ... so I turn to the experts. Can someone PLEASE help!?






Bookmarks