SQL::Connection::ToPropertyArray()
Syntax
Result_Flag as L = <SQL::Connection>.ToPropertyArray( Query as C [, <Arguments> as SQL::Arguments [, DataArray as P [, RowsToCopy as N [, StartRow as N ]]]] )
|
Argument |
Description |
|
Result_Flag |
TRUE (.T.) if the operation was successful; otherwise FALSE (.F.). |
|
<SQL::Connection> |
|
|
Query |
The SQL query that selects the data to retrieve. |
|
<Arguments> |
Optional. A SQL::Arguments object. One or more arguments to be resolved when the SELECT statement is executed. |
|
DataArray |
Pointer array to receive the retrieved data. |
|
RowsToCopy |
Optional. Default = -1 (all). The number of rows to copy. |
|
StartRow |
Optional. Default = 1 (first). The first row to copy. |
Description
The ToPropertyArray() method fetches the results of the query to the DataArray property array. The property array will be initialized with columns matching the names of the fields retrieved.
Note : Spaces are replaced
with underscores.
Supported By
Alpha Five Version 8 Enterprise Edition
Limitations
Desktop applications only.
Examples
|
dim conn as SQL::Connection dim connString as C dim query as C dim args as SQL::Arguments dim array[0] as P dim results as C query = "select firstname, lastname from customer where lastname > 'm'" connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}" if .not. conn.open(connString) ui_msg_box("Error", conn.CallResult.text) end end if if .not. conn.ToPropertyArray(query, args, array, 5, 3) ui_msg_box("Error", conn.CallResult.text) conn.close() end end if results = property_to_string(array) ui_msg_box("Results", results) conn.close() |
See Also