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