Hi, i am a new asp user and i keep on getting this error when i run my program
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/call_log_system/call_log27/calllog/month_results.asp, line 219
End if
My code looks like this, I am trying to have an option of changing a password
<% Option Explicit%>
<% @LANGUAGE=VBScript %>
<%
Dim CConn, sql, rs, Login_Name, p2, LName, ps, login_password1, login_password2
If IsObject( Session( "CConn" ) ) Then
Set CConn = Session( "CConn" )
Else
set CConn = server.createobject("adodb.connection")
constr = "Driver=MySQL ODBC 3.51 Driver;Server=9.135.100.128;uid=root;pwd=kabelo;database=calldb"
CConn.open constr
Set Session( "CConn" ) = CConn
End If
If Request.Form.Count > 0 Then
LName = Lcase(Request.Form("loginid"))
ps = Request.Form("submit_login")
login_password1 = Request.Form("pass1")
login_password2 = Request.Form("pass2")
If LName = "" OR ps = "" OR login_password1 = "" OR login_password2 = "" Then
Session( "empty" ) = True
Session( "notequal" ) = False
Session( "Fail" ) = False
Session( "PC" ) = False
Session( "len" ) = False
Session( "continue" ) = False
Call Response.Redirect( "change_pass1.asp" )
End If
If Len(Request( "pass1" )) < 4 OR Len(Request( "pass2" )) < 4 Then
Session( "len" ) = True
Session( "empty" ) = False
Session( "notequal" ) = False
Session( "Fail" ) = False
Session( "PC" ) = False
Session( "continue" ) = False
Call Response.Redirect( "change_pass1.asp" )
End If
If Request( "pass1" ) = Request( "pass2" ) Then
Session( "empty" ) = False
Session( "notequal" ) = False
Session( "Fail" ) = False
Session( "PC" ) = False
Session( "len" ) = False
Session( "continue" ) = True
Else
Session( "empty" ) = False
Session( "notequal" ) = True
Session( "Fail" ) = False
Session( "PC" ) = False
Session( "continue" ) = False
Session( "len" ) = False
Call Response.Redirect( "change_pass1.asp" )
End If
End If
If Session( "continue" ) = True Then
sql = "SELECT FROM access"
Set rs = Server.CreateObject( "ADODB.Recordset" )
rs.Open sql, CConn
rs.MoveFirst()
While Not rs.EOF
If LName = Lcase(rs( "login_id" )) AND ps = rs( "login_password" ) Then
set CConn = server.createobject("ADODB.Connection")
constr = "Driver=MySQL ODBC 3.51 Driver;Server=9.135.100.128;uid=root;pwd=kabelo;database=calldb"
CConn.open constr
sql = "select from access where login_id = '" & LName & "'"
set rs = Server.Createobject("ADODB.Recordset")
rs.open sql, CConn,,3
rs("login_id") = LName
rs("login_password")= login_password2
rs.update
Session( "empty" ) = False
Session( "notequal" ) = False
Session( "Fail" ) = False
Session( "PC" ) = True
Session( "len" ) = False
Session( "continue" ) = False
Call Response.Redirect( "change_pass1.asp" )
End If
rs.MoveNext()
Wend
Session( "Fail" ) = True
Session( "PC" ) = False
Session( "empty" ) = False
Session( "notequal" ) = False
Session( "len" ) = False
Session( "continue" ) = False
Call Response.Redirect( "change_pass1.asp" )
End If
%>