Sign in to follow this  
Followers 0
rec9140

Objects and arrays

2 posts in this topic

I am trying to resolve some tasks that scream out for being automated.

I've going to try to use Autoit and some UDF's to accomplish this if I can.

So,,, quickly I whipped up a au3 that can read the requisite excel file(s) and turn their results into a nice sorted array.

Ok lets yank out the MySQL data to compare against.

scrunch....crash....

The MySQL UDF reads in the results rows as an object not an array.

I understand that if you were to get huge result sets that an object may make sense, in my case the results sets are highly controlled under 1500 max, and that would be on a really good day, with a tail wind etc.. ;)

Back to point... has some one already invented the wheel and able to turn an object into an array so I can do my comparisons?

Or is there some better way to do it???

Like I said I am tightly controlling the results sets, only pulling 3 columns out of the table, and need to compare one column to the array thats generated by the excel code.

FAQ's, howto's, man pages, etc..

Any thing that would be a help to steer a better path or a way to get an array out of a MySQL query v. an object.

Share this post


Link to post
Share on other sites



I am trying to resolve some tasks that scream out for being automated.

I've going to try to use Autoit and some UDF's to accomplish this if I can.

So,,, quickly I whipped up a au3 that can read the requisite excel file(s) and turn their results into a nice sorted array.

Ok lets yank out the MySQL data to compare against.

scrunch....crash....

The MySQL UDF reads in the results rows as an object not an array.

I understand that if you were to get huge result sets that an object may make sense, in my case the results sets are highly controlled under 1500 max, and that would be on a really good day, with a tail wind etc.. ;)

Back to point... has some one already invented the wheel and able to turn an object into an array so I can do my comparisons?

Or is there some better way to do it???

Like I said I am tightly controlling the results sets, only pulling 3 columns out of the table, and need to compare one column to the array thats generated by the excel code.

FAQ's, howto's, man pages, etc..

Any thing that would be a help to steer a better path or a way to get an array out of a MySQL query v. an object.

The object you get back is called a "Recordset", and contains the data from your query. You would use COM Object methods to work with the recordset: ADODB Recordset Tutorial

If you look closely at the code inside the MySQL.au3 functions, you will see these methods being used.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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