使用关卡时 Dreamweaver 用户身份验证出错

Error with Dreamweaver User Authentication when using levels

我正在使用 Dreamweavers 用户身份验证,自从我介绍了 'levels' 的使用后,它就一直出错

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error near 'group' on line 1

/coding/login.asp, line 29

我的代码如下

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/Conn_PSCRM_Demo.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername = CStr(Request.Form("usercode"))
If MM_valUsername <> "" Then
  Dim MM_fldUserAuthorization
  Dim MM_redirectLoginSuccess
  Dim MM_redirectLoginFailed
  Dim MM_loginSQL
  Dim MM_rsUser
  Dim MM_rsUser_cmd
  
  MM_fldUserAuthorization = "group"
  MM_redirectLoginSuccess = "quote-search.asp"
  MM_redirectLoginFailed = "no_access.asp"

  MM_loginSQL = "SELECT usercode, epros_password"
  If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
  MM_loginSQL = MM_loginSQL & " FROM DBA.[user] WHERE usercode = ? AND epros_password = ?"
  Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
  MM_rsUser_cmd.ActiveConnection = MM_Conn_PSCRM_Demo_STRING
  MM_rsUser_cmd.CommandText = MM_loginSQL
  MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 255, MM_valUsername) ' adVarChar
  MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 255, Request.Form("password")) ' adVarChar
  MM_rsUser_cmd.Prepared = true
  Set MM_rsUser = MM_rsUser_cmd.Execute

  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 <> "") Then
      Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
    Else
      Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And true 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
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>

<body>
    <div>
    <h1>Coding</h1>
    <p>Enter your username and password below to login</p>
    <form ACTION="<%=MM_LoginAction%>" METHOD="POST" id="coding_login" name="coding-login">
        <table width="50%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th scope="row">Username:</th>
    <td><label for="usercode"></label>
      <input name="usercode" type="text" required id="usercode" size="5" maxlength="3"></td>
  </tr>
  <tr>
    <th scope="row">Password:</th>
    <td><label for="password"></label>
      <input name="password" type="password" id="password" size="10" maxlength="25" required></td>
  </tr>
  <tr>
    <th scope="row">&nbsp;</th>
    <td><input type="submit" name="Login" id="Login" value="Login"></td>
  </tr>
</table>
</form>
</div>
</body>
</html>

我们将不胜感激。

"group"是sybase中的保留字(我想还有很多其他的数据库系统)

在第 16 行尝试

MM_fldUserAuthorization = """group"""