Sign in to follow this  
Followers 0
Khab

Getting the size of an unkown 2d array?

4 posts in this topic

Sorry, this is probably a dumb question, but I couldn't find it in the docs or by searching. I am getting a 2D array generated by an ADODB recordset from a SQL query - how do I find the maximum dimensions of the array?

e.g. if it is an $array[5][6] how do I get those values, is there some equivalent to .getLength or .getSize or something?

I've played around trying what I think makes sense and cannot work it out :party:

Again, sorry for the silly question.

$QueryResult = ObjCreate("ADODB.Recordset")
$QueryResult.Open($sql_query, $sql_conn)
$ResultArray = $QueryResult.GetRows()

So it's the dimensions of $ResultArray I'm after.. thanks! :)

Share this post


Link to post
Share on other sites



yes... UBound ($ARRAY, $DIMENSION)..... not those exact variables but you get my point

Share this post


Link to post
Share on other sites

Awesome, thanks!

Share this post


Link to post
Share on other sites

Thanubis beat me to it... :) but no problemo...i didn't know about Ubound until about 3 months into my scripting experience... its usefull try using the helpfile Index section... it searches the helpfile by what you type... might be of someuse later on

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