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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to SQL server and using as L/P

Status
Not open for further replies.

hopper13

Technical User
Aug 17, 2001
2
US
I am attempting to use some code I found on the site to connect to our sql server. My goal is to show the results of a query only if the L/P match from the sql table. I keep getting this error message. Any ideas on this message or just a better bit of code in general would be greatly appericated
TIA
Hopper
Code:
=====================================================
Microsoft OLE DB Provider for SQL Server error '80004005' 

An old netlib (DBMSSOCN) has been detected. Please delete it and restart the application. 

/ctc/test/Verify.asp, line 16 

=======================================================
Below is my code to try and connect to the server
FYI the line Conn.open is line 16 on my side
(not sure of formatting after posting)
======================================================
<%@ Language=VBScript %>
<% Response.Buffer = true %>
<html>

<head>
<title></title>
</head>

<body>
<%
Dim Conn
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Set RS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
' Connection string to login to SQL server Triton
Conn.ConnectionString =&quot;Provider=SQLOLEDB.1;User ID=CTCAdmin; Password=ctcadmin;Initial Catalog=CTCTrain;Data Source=TRITON;&quot;
Conn.Open
' Begin selection of L/P
RS.Open &quot;select * from tblEmployees&quot;, Conn
if not RS is nothing then
    RS.movefirst()
    exitcondition = false
    while not RS.eof and not exitcondition
        if RS(&quot;UserName&quot;) = Request.Form(&quot;username&quot;) then
            if RS(&quot;PassWord&quot;) = Request.Form(&quot;password&quot;) then
                Response.write &quot;<b><font color=&quot;&quot;red&quot;&quot;>Login Works show results</font></b>&quot;
                Session(&quot;userid&quot;) = RS(&quot;ID&quot;)
                exitcondition = true
            end if
        end if
        RS.MoveNext
    wend
end if
if Session(&quot;userid&quot;) <> &quot;&quot; and not IsEmpty(Session(&quot;userid&quot;)) then
    Response.write &quot;<b><font color=&quot;&quot;red&quot;&quot;>Login Works default</font></b>&quot;
else
    Response.write &quot;<b><font color=&quot;&quot;red&quot;&quot;>Inccorect Login or Login not found</font></b>&quot;
    Response.flush
end if
%>
</body>
</html>
<% Response.End %>
 
I found this suggestion on the web. Hope it helps!

Search for dbmssocn.dll file in your server. Most likely you will find 2
copies of the file. One in Winnt/system32 and one in Winnt/system32/inetsrv.
Compare the date. One of them will be a older version (the one in inetsrv
folder) rename that and restart the server, it should be okay.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top