Forums

ASP

This topic is locked

REGISTRATION PAGE

Posted 09 Feb 2002 01:15:11
1
has voted
09 Feb 2002 01:15:11 Serge Chabert posted:
Hello, when creating a registration page and trying to visualise in internet explorer, here is the message that is displayed.
i really do not understand why and it is driving me mad.

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/iisHelp/common/500-100.asp, line 11

Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP Dim strMethod, lngPos, datNow, strQueryString, strURL
--------------------------------------------------------------------------^
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][Microsoft Access ODBC DRIVER] Syntax error (missing operator) in the expression "First Name"

/register.asp, line 32


what is happening. here is the code i have on the page.

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connlogon.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL"
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("username")
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="success.asp"
MM_redirectLoginFailed="index.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_connlogon_STRING
MM_rsUser.Source = "SELECT username, password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM user 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 <> "" Then
Session("MM_UserAuthorization" = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization" = ""
End If
if CStr(Request.QueryString("accessdenied") <> "" 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
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p> </p>
<p> </p>
<table width="23%" border="0" align="center">
<tr>
<td>
<form name="form1" method="post" action="<%=MM_LoginAction%>">
<p> username
<input type="text" name="username">
</p>
<p>password
<input type="password" name="password">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</td>
</tr>
</table>
</body>
</html

I AM USING UD 4 AND IIS ON WINDOWS XP.

I AM DESPERATE BECAUSE I HAVE BEEN TRYING FOR SIX MONTH TO SETUP A DATABASE ON A WEBSITE AND THE ONLY THING THAT WORK IS THE LOGIN BEHAVIOR. CAN ANYBODY TELL ME WHY ?

THANK YOU


Replies

Replied 13 Feb 2002 21:18:01
13 Feb 2002 21:18:01 Joel Martinez replied:
Wherever this text is,
Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP Dim strMethod, lngPos, datNow, strQueryString, strURL
--------------------------------------------------------------------------^

A DIM statement needs to be the first on a line... that is why you are getting this error. I couldn't find it in the page you pasted so I'm assuming its in the include file.

if this text is not in the include file, then your server has issues and may need to be reinstalled

Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/

Reply to this topic