Format of the stored data

The results of the SQLQuery action are stored as a two-dimensional array that is one column wider and one row taller than the size of the block of data returned. Row 0 is used to store the names of the columns (the field names from the database), and Column 0 is used to store a zero-based index (see Table 1 below). The entry at Row 0, Column 0 contains an empty string. The remainder of the array contains the actual data. All values are strings.

Table 1 shows as an example the results of a query, a 3 x 5 block of data, stored in a 4 x 6 array:
Table 1. Example of two-dimensional array containing results
(empty string) TOPICID EXMPLID DESCRIPT
0 4 18 Create a toolbar with custom buttons.
1 9 54 Attach tables at startup.
2 11 74 Edit Products.
3 11 75 Enter or Edit Products
4 11 76 Find Customers
In the table above, the entry at Row 0, Column 0 contains an empty string. The remainder of Row 0 contains the field names from the database (TOPICID, EXMPLID, DESCRIPT). The remainder of Column 0 contains index numbers for the rows (0, 1, 2, 3, 4). The actual data is contained in the remainder of the array. All values are strings.