Weird VBScript Syntax error in an ASP page -> '800a03ea'

Discussion in 'ASP General' started by NanQuan, Oct 16, 2004.

  1. NanQuan

    NanQuan Guest

    I'm hoping someone can help me solve this error since I am at a total
    loss here. Usually I don't bother posting on any forums or groups on
    the internet and prefer to solve stuff myself but this is a total
    mistery.

    I have a function inside an ASP page as a result of which I get the
    following error message:

    Microsoft VBScript compilation error '800a03ea'

    Syntax error

    /admin/dev/Order/process.asp, line 160

    Function heenEncode(string)
    ^

    I developed this function in a seperate ASP page and it worked with no
    problems what so ever. However when I finished developing it and
    proceeded to implement it in my another ASP page I suddenly got this
    weird error suggesting that there's something wrong with my syntax.

    Here is the function:

    <%
    Function heenEncode(string)
    x = Len(string)
    y = Len(string)
    a = 1

    Set d = Server.CreateObject("Scripting.Dictionary")

    Do While x>0
    T = heen(Mid(string,a,1))
    d.Add x, T
    a = a + 1
    x = x - 1
    Loop

    Do While y>0
    TT = TT + d.Item(y)
    y = y - 1
    Loop

    Set d = Nothing
    heenEncode = TT
    End Function


    Function heen(letter)
    dim ArHeb,ArEng

    ArHeb =Array("à","á","â","ã","ä","å","æ","ç","è","é","ë","ì","î","ð","ñ","ò","ô","ö","÷","ø","ù","ú","õ","ê","ó","ï","í")
    ArEng =Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","@")

    x = 26

    Do While (x > -1)
    If letter = ArHeb(x) Then
    letterT = ArEng(x)
    End If

    x = x - 1
    Loop

    If letterT = "" Then
    heen = letter
    Else
    heen = letterT
    End If
    End Function
    %>

    The 2nd function is a part of the first function, but it's not defined
    within the first function so please don't start suggesting that as a
    possible cause for the problem, plus it worked fine on a seperate ASP
    page just as it is.

    Any help would be greatly appreciated, since I read through some of
    the posts here regarding this error, but I couldn't find any solution
    that will work for my specific situation.

    Thanks!!
     
    NanQuan, Oct 16, 2004
    #1
    1. Advertising

  2. NanQuan

    Chris Barber Guest

    I put it into VB 6.0 and it complained about the use of 'string' as a variable name - it's a
    reserved word of course as the definition of a datatype.

    Change it.

    Chris.

    "NanQuan" <> wrote in message
    news:...
    I'm hoping someone can help me solve this error since I am at a total
    loss here. Usually I don't bother posting on any forums or groups on
    the internet and prefer to solve stuff myself but this is a total
    mistery.

    I have a function inside an ASP page as a result of which I get the
    following error message:

    Microsoft VBScript compilation error '800a03ea'

    Syntax error

    /admin/dev/Order/process.asp, line 160

    Function heenEncode(string)
    ^

    I developed this function in a seperate ASP page and it worked with no
    problems what so ever. However when I finished developing it and
    proceeded to implement it in my another ASP page I suddenly got this
    weird error suggesting that there's something wrong with my syntax.

    Here is the function:

    <%
    Function heenEncode(string)
    x = Len(string)
    y = Len(string)
    a = 1

    Set d = Server.CreateObject("Scripting.Dictionary")

    Do While x>0
    T = heen(Mid(string,a,1))
    d.Add x, T
    a = a + 1
    x = x - 1
    Loop

    Do While y>0
    TT = TT + d.Item(y)
    y = y - 1
    Loop

    Set d = Nothing
    heenEncode = TT
    End Function


    Function heen(letter)
    dim ArHeb,ArEng

    ArHeb
    =Array("à","á","â","ã","ä","å","æ","ç","è","é","ë","ì","î","ð","ñ","ò","ô","ö","÷","ø","ù","ú","õ","
    ê","ó","ï","í")
    ArEng
    =Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","
    x","y","z","@")

    x = 26

    Do While (x > -1)
    If letter = ArHeb(x) Then
    letterT = ArEng(x)
    End If

    x = x - 1
    Loop

    If letterT = "" Then
    heen = letter
    Else
    heen = letterT
    End If
    End Function
    %>

    The 2nd function is a part of the first function, but it's not defined
    within the first function so please don't start suggesting that as a
    possible cause for the problem, plus it worked fine on a seperate ASP
    page just as it is.

    Any help would be greatly appreciated, since I read through some of
    the posts here regarding this error, but I couldn't find any solution
    that will work for my specific situation.

    Thanks!!


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
     
    Chris Barber, Oct 16, 2004
    #2
    1. Advertising

  3. NanQuan

    NanQuan Guest

    Thanks for the suggestion Chris but that wasn't the problem. I changed
    it to 'str', and then to 'blah' just to make sure. But I got the exact
    same error message.

    As I already mentioned I tested the same function on a seperate ASP
    page and it worked perfectly just as it is. This problem only appeared
    when I tried to implement it in another ASP page. So there's nothing
    wrong with it's syntax.


    "Chris Barber" <> wrote in message news:<>...
    > I put it into VB 6.0 and it complained about the use of 'string' as a variable name - it's a
    > reserved word of course as the definition of a datatype.
    >
    > Change it.
    >
    > Chris.
    >
    > "NanQuan" <> wrote in message
    > news:...
    > I'm hoping someone can help me solve this error since I am at a total
    > loss here. Usually I don't bother posting on any forums or groups on
    > the internet and prefer to solve stuff myself but this is a total
    > mistery.
    >
    > I have a function inside an ASP page as a result of which I get the
    > following error message:
    >
    > Microsoft VBScript compilation error '800a03ea'
    >
    > Syntax error
    >
    > /admin/dev/Order/process.asp, line 160
    >
    > Function heenEncode(string)
    > ^
    >
    > I developed this function in a seperate ASP page and it worked with no
    > problems what so ever. However when I finished developing it and
    > proceeded to implement it in my another ASP page I suddenly got this
    > weird error suggesting that there's something wrong with my syntax.
    >
    > Here is the function:
    >
    > <%
    > Function heenEncode(string)
    > x = Len(string)
    > y = Len(string)
    > a = 1
    >
    > Set d = Server.CreateObject("Scripting.Dictionary")
    >
    > Do While x>0
    > T = heen(Mid(string,a,1))
    > d.Add x, T
    > a = a + 1
    > x = x - 1
    > Loop
    >
    > Do While y>0
    > TT = TT + d.Item(y)
    > y = y - 1
    > Loop
    >
    > Set d = Nothing
    > heenEncode = TT
    > End Function
    >
    >
    > Function heen(letter)
    > dim ArHeb,ArEng
    >
    > ArHeb
    > =Array("à","á","â","ã","ä","å","æ","ç","è","é","ë","ì","î","ð","ñ","ò","ô","ö","÷","ø","ù","ú","õ","
    > ê","ó","ï","í")
    > ArEng
    > =Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","
    > x","y","z","@")
    >
    > x = 26
    >
    > Do While (x > -1)
    > If letter = ArHeb(x) Then
    > letterT = ArEng(x)
    > End If
    >
    > x = x - 1
    > Loop
    >
    > If letterT = "" Then
    > heen = letter
    > Else
    > heen = letterT
    > End If
    > End Function
    > %>
    >
    > The 2nd function is a part of the first function, but it's not defined
    > within the first function so please don't start suggesting that as a
    > possible cause for the problem, plus it worked fine on a seperate ASP
    > page just as it is.
    >
    > Any help would be greatly appreciated, since I read through some of
    > the posts here regarding this error, but I couldn't find any solution
    > that will work for my specific situation.
    >
    > Thanks!!
    >
    >
    > ---
    > Outgoing mail is certified Virus Free.
    > Checked by AVG anti-virus system (http://www.grisoft.com).
    > Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
     
    NanQuan, Oct 17, 2004
    #3
  4. NanQuan wrote:
    > Thanks for the suggestion Chris but that wasn't the problem. I changed
    > it to 'str', and then to 'blah' just to make sure. But I got the exact
    > same error message.
    >
    > As I already mentioned I tested the same function on a seperate ASP
    > page and it worked perfectly just as it is. This problem only appeared
    > when I tried to implement it in another ASP page. So there's nothing
    > wrong with it's syntax.
    >
    >

    So doesn't it make sense that there is something wrong with the way you
    "implemented" it? Provide some details so we can attempt to help you.

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Oct 17, 2004
    #4
  5. NanQuan

    Chris Barber Guest

    OK, the line that is showing as the error is not the actual source of the problem. The source of
    the problem lies above this line. The reason that the compiler is complaining is that the new
    Function declaration cannot be started because of a prior issue.

    Try this:

    <%

    Response.Write heenEncode("Test String")
    'Line below is for PrimalScript testing.
    'WScript.Echo Response.Write heenEncode("Test String")

    Function heenEncode(pstrString)
    Dim x, y, a, d, T, TT

    x = Len(pstrString)
    y = Len(pstrString)
    a = 1

    'This line is for PrimalScript testing.
    'Set d = CreateObject("Scripting.Dictionary")
    Set d = Server.CreateObject("Scripting.Dictionary")

    Do While x>0
    T = heen(Mid(pstrString,a,1))
    d.Add x, T
    a = a + 1
    x = x - 1
    Loop

    Do While y>0
    TT = TT + d.Item(y)
    y = y - 1
    Loop

    Set d = Nothing

    heenEncode = TT

    End Function


    Function heen(pstrLetter)
    Dim ArHeb, ArEng
    Dim x, letterT

    ArHeb
    =Array("à","á","â","ã","ä","å","æ","ç","è","é","ë","ì","î","ð","ñ","ò","ô","ö","÷","ø","ù","ú","õ","
    ê","ó","ï","í")
    ArEng
    =Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","
    x","y","z","@")

    x = 26

    Do While (x > -1)
    If pstrLetter = ArHeb(x) Then
    letterT = ArEng(x)
    End If
    x = x - 1
    Loop

    If letterT = "" Then
    heen = pstrLetter
    Else
    heen = letterT
    End If

    End Function

    %>

    This worked in both PrimalScript (Interdev debugging) and as an .asp page in my local IIS (Windows
    XP Pro).

    Maybe you have a different version of the VBScript engine on that box?

    Chris.


    "NanQuan" <> wrote in message
    news:...
    Thanks for the suggestion Chris but that wasn't the problem. I changed
    it to 'str', and then to 'blah' just to make sure. But I got the exact
    same error message.

    As I already mentioned I tested the same function on a seperate ASP
    page and it worked perfectly just as it is. This problem only appeared
    when I tried to implement it in another ASP page. So there's nothing
    wrong with it's syntax.


    "Chris Barber" <> wrote in message
    news:<>...
    > I put it into VB 6.0 and it complained about the use of 'string' as a variable name - it's a
    > reserved word of course as the definition of a datatype.
    >
    > Change it.
    >
    > Chris.
    >
    > "NanQuan" <> wrote in message
    > news:...
    > I'm hoping someone can help me solve this error since I am at a total
    > loss here. Usually I don't bother posting on any forums or groups on
    > the internet and prefer to solve stuff myself but this is a total
    > mistery.
    >
    > I have a function inside an ASP page as a result of which I get the
    > following error message:
    >
    > Microsoft VBScript compilation error '800a03ea'
    >
    > Syntax error
    >
    > /admin/dev/Order/process.asp, line 160
    >
    > Function heenEncode(string)
    > ^
    >
    > I developed this function in a seperate ASP page and it worked with no
    > problems what so ever. However when I finished developing it and
    > proceeded to implement it in my another ASP page I suddenly got this
    > weird error suggesting that there's something wrong with my syntax.
    >
    > Here is the function:
    >
    > <%
    > Function heenEncode(string)
    > x = Len(string)
    > y = Len(string)
    > a = 1
    >
    > Set d = Server.CreateObject("Scripting.Dictionary")
    >
    > Do While x>0
    > T = heen(Mid(string,a,1))
    > d.Add x, T
    > a = a + 1
    > x = x - 1
    > Loop
    >
    > Do While y>0
    > TT = TT + d.Item(y)
    > y = y - 1
    > Loop
    >
    > Set d = Nothing
    > heenEncode = TT
    > End Function
    >
    >
    > Function heen(letter)
    > dim ArHeb,ArEng
    >
    > ArHeb
    >

    =Array("à","á","â","ã","ä","å","æ","ç","è","é","ë","ì","î","ð","ñ","ò","ô","ö","÷","ø","ù","ú","õ","
    > ê","ó","ï","í")
    > ArEng
    >

    =Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","
    > x","y","z","@")
    >
    > x = 26
    >
    > Do While (x > -1)
    > If letter = ArHeb(x) Then
    > letterT = ArEng(x)
    > End If
    >
    > x = x - 1
    > Loop
    >
    > If letterT = "" Then
    > heen = letter
    > Else
    > heen = letterT
    > End If
    > End Function
    > %>
    >
    > The 2nd function is a part of the first function, but it's not defined
    > within the first function so please don't start suggesting that as a
    > possible cause for the problem, plus it worked fine on a seperate ASP
    > page just as it is.
    >
    > Any help would be greatly appreciated, since I read through some of
    > the posts here regarding this error, but I couldn't find any solution
    > that will work for my specific situation.
    >
    > Thanks!!
    >
    >
    > ---
    > Outgoing mail is certified Virus Free.
    > Checked by AVG anti-virus system (http://www.grisoft.com).
    > Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004



    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
     
    Chris Barber, Oct 17, 2004
    #5
  6. NanQuan

    NanQuan Guest

    Thanks to everyone, but I found the Cause for this problem. Apparently
    I had a subroutine above the line that the debugger pointed at in
    which there was an open "Sub xxx" without an "End Sub".

    It sounds really stupid, but the reason I missed it is because the sub
    which was causing the problem was supposed to be a comment --> '

    It was at the top of about 10 lines in a row that were comments, so I
    didn't notice that I had forgotten to add a --> ' before the line.

    Plus the debugger really threw me off course saying the problem was
    specificaly with another line, when in fact it was at a totally
    different location. So I didn't even thing to look elswhere at first.

    Again, I really appreciate your time and effort in trying to help me
    solve this problem.

    Thanks Everyone!!!
     
    NanQuan, Oct 23, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Aguilar

    Weird syntax error with templates

    James Aguilar, Dec 5, 2004, in forum: C++
    Replies:
    2
    Views:
    495
    Daniel Mitchell
    Dec 5, 2004
  2. =?ISO-8859-15?Q?S=F6nke_Tesch?=

    Weird syntax error with gcc and FreeBSD

    =?ISO-8859-15?Q?S=F6nke_Tesch?=, Oct 22, 2003, in forum: C Programming
    Replies:
    5
    Views:
    484
    =?ISO-8859-1?Q?S=F6nke_Tesch?=
    Oct 24, 2003
  3. Frank
    Replies:
    2
    Views:
    141
    Curt_C [MVP]
    Aug 21, 2003
  4. timstu
    Replies:
    6
    Views:
    186
  5. Mark Richards
    Replies:
    3
    Views:
    348
    Tad McClellan
    Nov 18, 2007
Loading...

Share This Page