Jump to content

How to determine size and status of an array


ray306
 Share

Recommended Posts

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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...