473,549 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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(stri ng)
^

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(stri ng)
x = Len(string)
y = Len(string)
a = 1

Set d = Server.CreateOb ject("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!!
Jul 19 '05 #1
5 14588
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" <na*****@walla. co.il> wrote in message
news:a9******** *************** ***@posting.goo gle.com...
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(stri ng)
^

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(stri ng)
x = Len(string)
y = Len(string)
a = 1

Set d = Server.CreateOb ject("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
Jul 19 '05 #2
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" <ch***@blue-canoe.co.uk.NOS PAM> wrote in message news:<e4******* *******@TK2MSFT NGP12.phx.gbl>. ..
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" <na*****@walla. co.il> wrote in message
news:a9******** *************** ***@posting.goo gle.com...
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(stri ng)
^

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(stri ng)
x = Len(string)
y = Len(string)
a = 1

Set d = Server.CreateOb ject("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

Jul 19 '05 #3
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
"implemente d" 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"
Jul 19 '05 #4
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("Tes t String")
'Line below is for PrimalScript testing.
'WScript.Echo Response.Write heenEncode("Tes t String")

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

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

'This line is for PrimalScript testing.
'Set d = CreateObject("S cripting.Dictio nary")
Set d = Server.CreateOb ject("Scripting .Dictionary")

Do While x>0
T = heen(Mid(pstrSt ring,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" <na*****@walla. co.il> wrote in message
news:a9******** *************** ***@posting.goo gle.com...
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" <ch***@blue-canoe.co.uk.NOS PAM> wrote in message
news:<e4******* *******@TK2MSFT NGP12.phx.gbl>. ..
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" <na*****@walla. co.il> wrote in message
news:a9******** *************** ***@posting.goo gle.com...
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(stri ng)
^

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(stri ng)
x = Len(string)
y = Len(string)
a = 1

Set d = Server.CreateOb ject("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
Jul 19 '05 #5
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!!!
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
5997
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
1
2772
by: amit | last post by:
I am trying to compile the sample program genwin.sqc, using nsqlprep which is used to precompile embedded sql in C. I am getting weird errors and that is because windows.h is included in the genwin.sqc file. I am using Setting the lib and include path: set INCLUDE=C:\Program Files\Microsoft SQL...
3
1651
by: s_m_b | last post by:
Anyone ever seen this before? A page that generates a calendar view, works just fine without 'option explicit' . Add this in, but have missed some dim statements out in error, so page should error . Instead of error, the un-dim-ed variables are ignored and their portions of the code simply are not used - behavour as though entire loops etc...
3
7017
by: Joe Caverly | last post by:
Hi, I'm using Visual C++ 32-bit Professional Edition 5.0 Using Microsoft Knowledge Base Article 181473 as a basis, I'm trying to transform this VB Code; Dim sc As Object Dim code As String Set sc = CreateObject("ScriptControl") sc.Language = "VBScript"
9
12323
by: Pete | last post by:
Does anyone have a simple html vbscript or other type of snippet they can share that appends a record to a access database via ADO or DAO? I would like to allow users that don't have Microsoft Access a way of adding records to a access database from a simple web page. I don't want to have to setup ODBC or anything like that I just want to put...
6
1545
by: gh0st54 | last post by:
Hi I have a weird javascript error that only happens on my live server when i open the page http://www.imrated.co.uk/reg.aspx i get the error 'Problems with this page ... blablabla Line : 3 Char : 1 Error:Syntax error
2
4630
by: WisTex | last post by:
I've come across a very weird problem. Virtual includes work on all my ASP pages on the entire website, including those in subdirectories, yet they won't work on a particular page I created, even though the virtual include statement is copy & pasted exactly as it appears on the working pages. What would cause virtual includes to work in one...
6
8985
by: John Kotuby | last post by:
Hi all, I am simply trying to include the Option Explicit declaration at the top of an ASP page and am getting an error: Error Type: Microsoft VBScript compilation (0x800A0400) Expected statement /transferkey.asp, line 2
2
2867
by: Beemer Biker | last post by:
I put together a few lines of vbscript so I could dump the contents of a string to my C drive. It worked fine in a small test.htm where I put the vbscript at the top of the file. It failed to work (no error message) in my large program where I needed to dump out the stuff. I did get an error message from FrontPage 2003 but it was not...
2
4555
by: tunk | last post by:
I dont know where to start my question so let me tell you my story :) The ASP that cause me trouble is running on IIS that set ASP default language to JScript instead of VBScript. This ASP page is popped up by another ASP page and there are authentication, privilege and security stuff involved. And yes this page contain a lot of javascript....
0
7971
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7491
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3509
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3491
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1068
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.