Jump to content

Recommended Posts

Posted

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! :)

Posted

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

Posted

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

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
×
×
  • Create New...