Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Log In User with Levels

Posted 24 Jan 2002 16:18:51
1
has voted
24 Jan 2002 16:18:51 Jennifer Shark posted:
Hi,

I am having a bit of trouble with the log on user with levels behavior in UD4. When I do the log-in without the levels feature it works like a dream. When I do the log in with the levels feature, however, I get the following error:

<i>Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] The LEVEL clause includes a reserved word or argument that is misspelled or missing, or the punctuation is incorrect.

/administration/index.asp, line 32
</i>

Has anyone else experienced this problem? Have you found any solutions?

Thanks.

Replies

Replied 24 Jan 2002 17:01:13
24 Jan 2002 17:01:13 Mark Labordus replied:
I'm very interested in what the LEVEL clause looks like..
I'm using access levels on my site without problem.
Mark.

Replied 24 Jan 2002 17:31:21
24 Jan 2002 17:31:21 Jennifer Shark replied:
Here is the asp as it appears in ud.

' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL"
If Request.QueryString&lt;&gt;"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("username")
If MM_valUsername &lt;&gt; "" Then
MM_fldUserAuthorization="level"
MM_redirectLoginSuccess="page1.asp"
MM_redirectLoginFailed="restricted.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_login_STRING
MM_rsUser.Source = "SELECT username, password"
If MM_fldUserAuthorization &lt;&gt; "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM admin_logon WHERE username='" & MM_valUsername &"' AND password='" & CStr(Request.Form("password") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username" = MM_valUsername
If (MM_fldUserAuthorization &lt;&gt; "" Then
Session("MM_UserAuthorization" = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization" = ""
End If
if CStr(Request.QueryString("accessdenied") &lt;&gt; "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied"
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If

Thanks.





Reply to this topic