Result as L = ToPropertyArray(Array as p [, RowsToCopy = -1 as N [, StartRow = -1 as N ]])
- ArrayPointer Array
A pointer array to populate with the data in the result set.
Default = -1. The number of rows to copy. A value of -1 will copy all rows.
Default = 1. The first row to copy.
TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).
Convert the ResultSet to a property array.
The ToPropertyArray() method creates pointer elements named after the names of the table field. It replaces spaces in names with underscores.
dim conn as SQL::Connection dim rs as SQL::ResultSet dim connString as C dim select_exp as C dim arr as P connString = "::Name::AADemo-Northwind" select_exp = "select * from customers where country='France'" 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("CustomerID ContactName, City"))