<% end if %>
I am getting the following error:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'UBOUND'
How do I solve the problem. Your help is kindly appreciated.
Eugene Anthony
*** Sent via Developersdex http://www.developersdex.com ***
You might find what you need on DevGuru: http://www.devguru.com
HTH,
Stu
How have you defined Arr?
--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Eugene Anthony" <solomo...@yahoo.com> wrote in message
news:LvFff.3$GX6....@news.uswest.net...
To debug add
response.write("<br>Var type of arr: " & Vartype(arr) )
before the if Ubound(arr) line.
It should tell you what it sees as 'arr's variable type.
Go to http://www.devguru.com/technologies/vbscript/13986.asp to find
what each vartype means. 8192 would be array type
Hope this helps
Bill
PS the previous respondant is right you would get a better response
from a VBScript news board
Have a look at the IsArray function to test for this before using the Ubound
function.
--
Terry Kreft
"Eugene Anthony" <solomo...@yahoo.com> wrote in message
news:LvFff.3$GX6....@news.uswest.net...
Personally, I'd look at the Dim statement so see if was an array :-)
Dim Arr ' i.e. a variant
Which at some later point is assigned a value such as
Arr = Array(1, 2)
After this line IsArray would return true, before this line it would return
false. Before this line Ubound(Arr) raises the error the OP has seen after
it the error is not raised, hence the reccomendation to use IsArray.
--
Terry Kreft
"Trevor Best" <nos...@localhost.invalid> wrote in message
news:4381c70a$0$23296$db0f...@news.zen.co.uk...
I'll repeat:
Personally, I'd look at the Dim statement so see if was an array :-)
i.e. I would never write code like that.