Sign in to follow this  
Followers 0
ray306

How to determine size and status of an array

3 posts in this topic

I have a array variable that I use to hold the result of database query.

I need to check the array before addressing it .

For instance I can use isArray()to check whether it is indeed an array. If the array is empty it will still

return 1(True) to the function. Normally you would check Array[0] but if the array variable is blank

the function will cause a fatal error ie. subscript out of range.

Any ideas on how to accomplish this?

I need to know its status so I can throw an error before actually attempting to perform operations if it happens to be empty.

Thanks

Ray

Share this post


Link to post
Share on other sites



Hi,

size --> check Ubound()

status --> declare it so you are yure it is an array.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

size --> check Ubound()

status --> declare it so you are yure it is an array.

So long,

Mega

Thanks Mega

Knew it was something simple.

BrainfreezeI guess

Thanks

Ray

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0