Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBScript compilation (0x800A03F6)

    Hi guys

    I'm having problems with this error. 'Expected end - line 77'

    pls help (below is my code)

    Thkx

    <%
    Function ChkString(str)

    str = replace(str, "<", "&lt;", 1, -1, 1)
    str = replace(str, ">", "&gt;", 1, -1, 1)

    ChkString = str
    End Function

    name = trim(ChkString(Request.form("name")))
    email = trim(ChkString(Request.form("email")))
    address = trim(ChkString(Request.form("address")))
    City = trim(ChkString(Request.form("city")))
    State = trim(ChkString(Request.form("state")))
    Country = trim(ChkString(Request.form("country")))
    Zipcode = trim(ChkString(Request.form("zip")))
    Password = trim(ChkString(Request.form("password")))

    ConnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("member.mdb")
    set my_conn= Server.CreateObject("ADODB.Connection")


    if rscheck.eof then
    set rs = server.CreateObject("ADODB.RecordSet")
    if been_here_before="No" then
    end if

    RScheck.close
    set rs = server.CreateObject("adodb.recordset")
    if been_here_before="No" then
    sql ="select * from member"

    RS.open Sql,my_conn,1,3
    RS.AddNew
    RS("Name")=name
    RS("email")=email
    RS("address")=address
    RS("city")=city
    RS("state")=state
    RS("country")=country
    RS("zipcode")=zipcode
    RS("password")= password
    RS("memberdate")= now()

    RS.update
    %>
    <body bgcolor="#99CCFF">

    <center><font face="Verdana" size="2">Your Account Has Been Processed!! <br>
    Your User ID is : <%=email%> , and your password is : <%=password%>
    </font>
    <p><a href="login.asp"><font face="Verdana" size="2">Go to Login Page</font> </a>

    </p></center>

    <%
    else
    %>
    <center><font face="Verdana" size="2">Your have signup already with this email<br>
    Please signup with another your email address.
    </font>
    <p><a href="signup.asp"><font face="Verdana" size="2">Sign up Again! </font> </a></center>



    <%


    rs.close
    my_conn.Close
    set my_conn = nothing
    set rs = nothing

    end if%> --- line 77

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    Quote Originally Posted by Rade5
    <%
    Function ChkString(str)

    str = replace(str, "<", "&lt;", 1, -1, 1)
    str = replace(str, ">", "&gt;", 1, -1, 1)

    ChkString = str
    End Function

    name = trim(ChkString(Request.form("name")))
    email = trim(ChkString(Request.form("email")))
    address = trim(ChkString(Request.form("address")))
    City = trim(ChkString(Request.form("city")))
    State = trim(ChkString(Request.form("state")))
    Country = trim(ChkString(Request.form("country")))
    Zipcode = trim(ChkString(Request.form("zip")))
    Password = trim(ChkString(Request.form("password")))

    ConnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("member.mdb")
    set my_conn= Server.CreateObject("ADODB.Connection")

    if rscheck.eof then
    set rs = server.CreateObject("ADODB.RecordSet")
    if been_here_before="No" then
    end if

    RScheck.close
    set rs = server.CreateObject("adodb.recordset")
    if been_here_before="No" then
    sql ="select * from member"

    RS.open Sql,my_conn,1,3
    RS.AddNew
    RS("Name")=name
    RS("email")=email
    RS("address")=address
    RS("city")=city
    RS("state")=state
    RS("country")=country
    RS("zipcode")=zipcode
    RS("password")= password
    RS("memberdate")= now()

    RS.update
    %>
    <body bgcolor="#99CCFF">

    <center><font face="Verdana" size="2">Your Account Has Been Processed!! <br>
    Your User ID is : <%=email%> , and your password is : <%=password%>
    </font>
    <p><a href="login.asp"><font face="Verdana" size="2">Go to Login Page</font> </a>

    </p></center>

    <%
    else
    %>
    <center><font face="Verdana" size="2">Your have signup already with this email<br>
    Please signup with another your email address.
    </font>
    <p><a href="signup.asp"><font face="Verdana" size="2">Sign up Again! </font> </a></center>



    <%


    rs.close
    my_conn.Close
    set my_conn = nothing
    set rs = nothing

    end if%> --- line 77
    i colored the starting of If blocks red, and the ending blue, as you can see, you miss one end
    I am the luckiest man in the world

  • #3
    New to the CF scene
    Join Date
    Sep 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried your suggestion, but I'm still getting the same error on the last line. I made a few changes to the code - not sure if that the problem. Pls see the code below

    Thkx
    ---------------------------------------------------------------



    <%
    Function ChkString(str)

    str = replace(str, "<", "&lt;", 1, -1, 1)
    str = replace(str, ">", "&gt;", 1, -1, 1)

    ChkString = str
    End Function

    Name = trim(ChkString(Request.form("name")))
    Email = trim(ChkString(Request.form("email")))
    Telephonenumber = trim(ChkString(Request.form("telephonenumber")))
    Mobilenumber = trim(ChkString(Request.form("mobilenumber")))
    Address = trim(ChkString(Request.form("address")))
    City = trim(ChkString(Request.form("city")))
    Country = trim(ChkString(Request.form("country")))
    Code = trim(ChkString(Request.form("Code")))

    ConnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("member.mdb")
    set my_conn= Server.CreateObject("ADODB.Connection")


    if rscheck.eof then
    set rs = server.CreateObject("ADODB.RecordSet")
    if been_here_before="No" then
    end if

    RScheck.close
    set rs = server.CreateObject("adodb.recordset")
    if been_here_before="No" then
    sql ="select * from member"

    RS.open Sql,my_conn,1,3
    RS.AddNew
    RS("Name")=name
    RS("email")=email
    RS("Telephonenumber")=telephonenumber
    RS("Mobilenumber")=mobilenumber
    RS("address")=address
    RS("city")=city
    RS("country")=country
    RS("code")=code

    RS.update
    %>
    <body bgcolor="#99CCFF">

    <center><font face="Verdana" size="2">Your details have been stored!! <br>
    </font></center>


    <%
    else
    %>

    <center><font face="Verdana" size="2">There's an account associated to this email address<br>
    Please logon using correct details. Thank you.</font></center>



    <%
    rs.close
    my_conn.Close
    set my_conn = nothing
    set rs = nothing

    end if%>

  • #4
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,062
    Thanks
    4
    Thanked 8 Times in 8 Posts
    You still do not have the last end if in there. I am guessing that you are a beginner at programming. When I was in school one of the first things we were taught was INDENT YOUR CODE!!! then you would have seen what Roelf told you. Here it is with the last end if added

    Code:
    Function ChkString(str) 
        str = replace(str, "<", "&lt;", 1, -1, 1)
        str = replace(str, ">", "&gt;", 1, -1, 1)
        ChkString = str
    End Function
    
    name = trim(ChkString(Request.form("name")))
    email = trim(ChkString(Request.form("email")))
    address = trim(ChkString(Request.form("address")))
    City = trim(ChkString(Request.form("city")))
    State = trim(ChkString(Request.form("state")))
    Country = trim(ChkString(Request.form("country")))
    Zipcode = trim(ChkString(Request.form("zip")))
    Password = trim(ChkString(Request.form("password")))
    
    ConnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("member.mdb")
    set my_conn= Server.CreateObject("ADODB.Connection")
    
    if rscheck.eof then
        set rs = server.CreateObject("ADODB.RecordSet")
        if been_here_before="No" then
        end if
    
        RScheck.close
        set rs = server.CreateObject("adodb.recordset") 
        if been_here_before="No" then 
            sql ="select * from member"
    
            RS.open Sql,my_conn,1,3
            RS.AddNew
            RS("Name")=name
            RS("email")=email
            RS("address")=address
            RS("city")=city
            RS("state")=state
            RS("country")=country
            RS("zipcode")=zipcode
            RS("password")= password
            RS("memberdate")= now()
            RS.update
    %>
    <body bgcolor="#99CCFF">
    
    <center><font face="Verdana" size="2">Your Account Has Been Processed!! <br>
    Your User ID is : <%=email%> , and your password is : <%=password%>
    </font>
    <p><a href="login.asp"><font face="Verdana" size="2">Go to Login Page</font> </a>
    
    </p></center>
    
    <%
        else 
    %>
    <center><font face="Verdana" size="2">Your have signup already with this email<br>
    Please signup with another your email address.
    </font>
    <p><a href="signup.asp"><font face="Verdana" size="2">Sign up Again! </font> </a></center>
    
    <%
             rs.close
             my_conn.Close 
             set my_conn = nothing
             set rs = nothing
    
          end if
    end if   ' missing end if has been added   
    %>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •