Microsoft VBScript compilation error '800a03ea'
Syntax error
/Geomedia_Web/Content/Build/QryReportBuild.inc, line 353
Public Function GetConnectionIndex(varConnectionDefs,
strConnectionName)
-------^
(This doesn't show up right in the message, the ^ is actually under
the F in Function.)
This is the entire result of the ASP, even though other things are
supposed to happen (ie straight HTML code) before the function is used
here:
***CODE******
slngConnectionIndex = GetConnectionIndex(svarConnectionDefs,
sstrConnectionName)
ConnectDataSources sobjMapServer, svarConnectionDefs
***End CODE***
Here is the code of the function itself:
***CODE***
Public Function GetConnectionIndex(varConnectionDefs,
strConnectionName)
Dim lng
Dim lngResult
Response.Write("Got to public function")
lngResult = -1
For lng = LBound(varConnectionDefs) To UBound(varConnectionDefs)
If varConnectionDefs(lng)(0) = strConnectionName Then
lngResult=lng
Exit For
End If
Next
GetConnectionIndex = lngResult
End Function
***End CODE***
More information: This ASP used to work fine. I changed some things in
the code, NOTHING in the code referenced above, and now I get an
error. I went back to the original file, and it still works perfectly.
Any idea why I'm getting this error? And why is this the only thing
that shows up on my page - why does it not execute any of my HTML code
that comes before this function is used?
Thank you!
Rebecca
The simple (bad) example below throws the same '800a03ea' error...
public function foo()
'...
public function bar()
'...
end function
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--
"Rebecca Howley" <almo...@hotmail.com> wrote in message news:ae22a3fa.0203...@posting.google.com...
Should it be:
If varConnectionDefs(lng,0) = ... ?
I did this script client side and I don't
get the same error but it definitely didn't
like the array(x)(y) syntax(?). It does work
with array(x,y).
Dim arrayOne(10,10)
For i = 0 to 10
For j = 0 to 10
arrayOne(i,j) = "A" & CStr(i) & CStr(j)
Next
Next
Function Test(arrayTwo, myVar)
For x = LBound(arrayTwo) to UBound(arrayTwo)
For y = LBound(arrayTwo,2) to UBound(arrayTwo,2)
'If arrayTwo(x)(y) = myVar Then
If arrayTwo(x,y) = myVar Then
myResult = "x= " & x & vbCrLf & "y= " & y
blnQuit = True
Exit For
End If
Next
If blnQuit Then
Exit For
End If
Next
Test = myResult
End Function
strMsg = Test(arrayOne,txt1.value)
MsgBox(strMSg)
hth,
Bill Wallace
"Rebecca Howley" <almo...@hotmail.com> wrote in message
news:ae22a3fa.0203...@posting.google.com...
varConnectionDefs would appear to be a 2D array defined in code not included in the original post...
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--
"Bill Wallace" <wal...@fix.net> wrote in message news:uhB#xeQ0BHA.2760@tkmsftngp07...
Bill Wallace
"Michael Harris" <mik...@mvps.org> wrote in message
news:OhMD7ER0BHA.1624@tkmsftngp03...
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--
"Bill Wallace" <wal...@fix.net> wrote in message news:u2ArjtX0BHA.1900@tkmsftngp02...
"Michael Harris" <mik...@mvps.org> wrote in message news:O05x1Zd0BHA.1624@tkmsftngp03...
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--
"Alex K. Angelopoulos" <alex_angelopoulos_at_hotmail_dot_com_remove__> wrote in message news:exqvuid0BHA.2488@tkmsftngp04...
"Michael Harris" <mik...@mvps.org> wrote in message news:#H0iI6d0BHA.1172@tkmsftngp04...
"Joe Fawcett" <j...@rightway.co.uk> wrote in message news:e739t$j0BHA.2596@tkmsftngp03...
: Don't they call it 'jagged array'? Just an early Saturday morning post. Got
: > >
: > >
: >
: >
: >
:
:
:
:
:
:
"Alex K. Angelopoulos" <alex_angelopoulos_at_hotmail_dot_com_remove__> wrote in
message news:#rcQ89l0BHA.2692@tkmsftngp04...
~Rebecca
"Michael Harris" <mik...@mvps.org> wrote in message news:<ueovRKQ0BHA.1900@tkmsftngp02>...
> Any chance you have inadvertently done an incude of the file that
> contains this code from *within* the body of another Sub or Function or
> that a preceding Sub/Function within the include file is missing its End
> Sub/Function statement.
>
> The simple (bad) example below throws the same '800a03ea' error...
>
> public function foo()
>
> '...
>
> public function bar()
>
> '...
>
> end function
>
>
> --
> Michael Harris
> Microsoft.MVP.Scripting
> Seattle WA US
> --
>
> "Rebecca Howley" <almo...@hotmail.com> wrote in message
> news:ae22a3fa.0203...@posting.google.com...
> > Hi, I'm getting this error on an ASP, the full error message is:
> >
> > Microsoft VBScript compilation error '800a03ea'
> >
> > Syntax error
> >
> > /Geomedia Web/Content/Build/QryReportBuild.inc, line 353