SQL::ResultSet::ToPropertyArray()
Syntax
Result_Flag as L = <SQL::ResultSet>.ToPropertyArray( DataArray as P [, RowsToCopy as N [, StartRow as N ]] )
|
Argument |
Description |
|
Result_Flag |
TRUE (.T.) if the operation was successful; otherwise FALSE (.F.). |
|
<SQL::ResultSet> |
A SQL::ResultSet object created with a DIM statement. |
|
DataArray |
Pointer array. |
|
RowsToCopy |
Optional. Default = -1. The number of rows to copy. |
|
StartRow |
Optional. Default = 1. The first row to copy. |
Description
The ToPropertyArray() method creates pointer elements named after the names of the table field. It replaces spaces in names with underscores.
Example
|
dim conn as SQL::Connection dim rs as SQL::ResultSet dim connString as C dim select_exp as C dim arr[1] as P connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}" select_exp = "select * from customer where bill_state_region = 'ny'" if .not. conn.open(connString) ui_msg_box("Error", conn.CallResult.text) end end if if .not. conn.execute(select_exp) ui_msg_box("Error", conn.CallResult.text) conn.close() end end if rs = conn.ResultSet rs.ToPropertyArray(arr) conn.close() ui_msg_box("Results", arr.dump_properties("Firstname Lastname, Bill_State_Region")) |
See Also
Supported By
Alpha Five Version 8 Enterprise Edition
Limitations
Desktop applications only.