mtettmar wrote:The longer term plan is to work towards creating real array structures to avoid this problem and add further capabilities.
Sounds good.
Capabilities I'd really like to see include:
1. A way to
instantly display the data inside an array structure to a user. I use MS to run queries and the database returns 4000 rows in only 10 seconds. At that point all the data is inside array variables in MS but there is NO FAST WAY for me to display that data to the user. Delphi has a DB Grid control... if we could add a DB Grid Control to a dialog and point it at the array that contains our data... that would be very nice (and I would hope... fast).
As it is, I have a loop that re-formats the data into either a csv file or an html web page and when done, the macro opens the file in either Excel or a browser. The problem is, it takes
6 minutes to reformat the data... just to get that data to the point that I can display it. A user will wait 10 seconds no problem... but 6 minutes is pushing it... even with a progress bar on my dialog and a text label that asks them to please wait.
Anything that could be done to speed up that reformatting loop would be great. I know that creating one HUGE variable and then writing that to disk in one shot is a BAD approach for large result sets... it gets slower and slower with each loop and takes far longer than 6 minutes. My loop now is writing each line to disk as it processes which is faster but still not fast enough.
2. Considering that exposing the Delphi DB Grid Control may not be happening soon (or ever)... please consider (or at least investigate if it is even possible) to create a version of the DBQuery command that directly creates one or both of these:
- a) a csv file of this standard form:
"col 1 data","col 2 data"
"col 1 data","col 2 data"
b) a html file (fragment) of this standard form:
col 1 datacol 2 data
col 1 datacol 2 data
If such a command is possible (DBQueryToFile> perhaps?) then this might allow one to create the file very quickly and therefore display the results to the user in maybe 15 seconds... verses the six minute wait they currently go through.
Marcus and all... your thoughts?