I read the nifty lessons posted about it, and was curious to see if the 'array' method might suit my purposes, and whether it was as fast or faster than using pure sql.
The program consists of 4 cards, each displaying 1 table from a sqlite db. Each card is named the same as the table. My understanding of the array lesson is that you put one column into one keyed array, then set the dgData to that variable once populated. Since I want as much of this process automated as possible, I wrote it like this -
Code: Select all
// set the variables used for this... put "" into tmpRecords // clear the variable... put 1 into tmpColNum // set up the first key... put "" into tmpColName // make sure the name is empty... // get the item to select ... repeat for each item x in tmpColumns if x is "Cover" then // drop it, this is retrieved when a row is selected... else put x into tmpColName // setup the sql statement... put "SELECT " & "`" & x & "`" & " FROM " & tmpTableName into tmpSql // load up the column into an array... put revDataFromQuery(,return,tmpConnId,tmpSql) into tmpRecords[tmpColNum][tmpColName] end if // filter for impurities using rev instead of sql... // filter tmpRecords[tmpColNum][tmpColName] without tab // keep count of each item and use that number to put the information into a column in the dg... add one to tmpColNum end repeat /* combine the array into datagrid format... I tried the 'combine with return and tab', didn't work...*/ // set the data into the dg... set the dgData of group "lstRecords" to tmpRecords
populated variables -
keys and data show up as I *think* it should look -
Unfortunately, when it gets to the datagrid, it only appears one of two ways, a single line across the columns, correctly formatted but only showing one record, or diagonally across the grid, showing just one record.
I am sure I am missing one impossibly simple thing, if anyone can point it out, I'd sure appreciate it.