Please help...
This is a script that was originally used with a microsoft access database for user id and password checking. I'm trying to modify it for use with a SQL Server instead of the Access database, but I keep getting this error:
Microsoft VBScript runtime (0x800A01A8)
Object required: '{string: "DRIVER={SQL Server};"]'
/fba/_private/logon19.inc, line 28
Any help would be greatly appreciated.
Thanks
...Josh
here is the logon19.inc script it's referring to:
This is a script that was originally used with a microsoft access database for user id and password checking. I'm trying to modify it for use with a SQL Server instead of the Access database, but I keep getting this error:
Microsoft VBScript runtime (0x800A01A8)
Object required: '{string: "DRIVER={SQL Server};"]'
/fba/_private/logon19.inc, line 28
Any help would be greatly appreciated.
Thanks
...Josh
here is the logon19.inc script it's referring to:
Code:
<%
' Do not cache this page.
Response.CacheControl = "no-cache"
' Define the name of the users table.
Const USERS_TABLE = "tblUsers"
' Define the path to the logon page.
Const LOGON_PAGE = "/fba/logon.asp"
' Define the path to the logon database.
Const MDB_URL = "membri"
' Check to see whether you have a current user name.
If Len(Session("UID")) = 0 Then
' Are you currently on the logon page?
If LCase(LOGON_PAGE) <> LCase(Request.ServerVariables("URL")) Then
' If not, set a session variable for the page that made the request...
Session("REFERRER") = Request.ServerVariables("URL")
' ...and redirect to the logon page.
Response.Redirect LOGON_PAGE
End If
End If
' This function checks for a username/password combination.
Function ComparePassword(UID,PWD)
Dim strSQL, objCN, objRS, ConnStr
strSQL = "SELECT * FROM qryLogin WHERE FMEAID='" & UID & "' AND txtPassword='" & PWD & "');"
'Use ns1.flmusiced.org for the data source for testing from your computer!
Set connstr = "DRIVER={SQL Server};SERVER=Server-Local;DATABASE=membri;UID=fmea;PWD=xxxx;"
set objRS = server.CreateObject("ADODB.Recordset")
objRS.open strSql, connstr
ComparePassword = Not(objRS.EOF)
Set objRS = Nothing
End Function
%>