Syntax
| SQL.RunQueryLoadArray2D Query, MyArray[, Timeout]
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Description
| Performs a query and loads the the entire record set into a two-dimensional array variable. All records are loaded into the array, with a maximum of 32767 rows.
The first dimension of the array contains the lines of the record set; the second dimension contains the individual fields.
In addition to rows and columns of the record set, the array also contains additional information:
myArray(0,0) contains the number of lines of the recordset
myArray(0,1..n) contains the column names of the recordset
myArray(1,1) contains the first column of the first row
...
| ||||||||
See Also
| other SQL.Runxxxxxxxx methodes, RunQueryLoadArray.
| ||||||||
Example
| Sub Main
Dim Query As String
Dim myArr() As String
Query = "SELECT * FROM Prm_FeestDagen"
SQL.RunQueryLoadArray2D Query, myArr()
Dim x As Integer, y As Integer
For x = 0 To UBound(myArr,1)
For y = 0 To UBound(myArr,2)
Debug.Print x & vbTab & y & vbTab & myArr(x,y)
Next y
Next x
End Sub
|