Home > Archive > Microsoft SQL Server forum > November 2005 > UBOUND









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author UBOUND
Eugene Anthony

2005-11-19, 7:23 am

<% if UBOUND(Arr) > 0 then%>

<% 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.droptable.com ***
Stu

2005-11-19, 9:23 am

You might get more help posting to the appropriate newsgroup (one that
deals with VBScript or ASP); this is a SQL Server newsgroup. It would
also be helpful if you posted more than two lines of code.

You might find what you need on DevGuru: http://www.devguru.com

HTH,
Stu

Tony Rogerson

2005-11-20, 3:23 am

Check out http://www.devguru.com/Technologies...ref/ubound.html

How have you defined Arr?

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


"Eugene Anthony" <solomon_13000@yahoo.com> wrote in message
news:LvFff.3$GX6.1074@news.uswest.net...
> <% if UBOUND(Arr) > 0 then%>
>
> <% 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.droptable.com ***



Bill

2005-11-20, 9:23 am

It looks like the arr data type is not being seen as an array.

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


On Sat, 19 Nov 2005 13:11:07 GMT, Eugene Anthony
<solomon_13000@yahoo.com> wrote:

><% if UBOUND(Arr) > 0 then%>
>
><% 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.droptable.com ***


Terry Kreft

2005-11-21, 7:23 am

As others have said this is a SQL group but having said that the answer is
probably that Arr is not an array.

Have a look at the IsArray function to test for this before using the Ubound
function.


--
Terry Kreft



"Eugene Anthony" <solomon_13000@yahoo.com> wrote in message
news:LvFff.3$GX6.1074@news.uswest.net...
> <% if UBOUND(Arr) > 0 then%>
>
> <% 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.droptable.com ***



Trevor Best

2005-11-21, 7:23 am

Terry Kreft wrote:
> As others have said this is a SQL group but having said that the answer is
> probably that Arr is not an array.
>
> Have a look at the IsArray function to test for this before using the Ubound
> function.


Personally, I'd look at the Dim statement so see if was an array :-)
Terry Kreft

2005-11-21, 9:23 am


If it's a variant array that wouldn't work e.g.

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" <nospam@localhost.invalid> wrote in message
news:4381c70a$0$2329
6$db0fefd9@news.zen.co.uk...
> Terry Kreft wrote:
>
> Personally, I'd look at the Dim statement so see if was an array :-)



Trevor Best

2005-11-22, 1:23 pm

Terry Kreft wrote:
> If it's a variant array that wouldn't work e.g.
>
> 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.


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.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com