project BLF > class Persistence Layer > method ReadQuery

Description

Read data from the database, and return all retrieved data in a single table.

PreCondition

This method is used in query calls and should not be used anywhere else.


Parameters


icQueryNameinputcharacter
icPrepareinputcharacterFor each statement for reading the data, excluding the no-lock option (this is implied automatically), excluding break by (not allowed, only normal by is allowed).
icTablesinputcharacterComma seperated list of all database tables in the for each statement.
ihDestinationBufferinputhandleHandle to the temp-table that will receive the data.
icLastRowidinputcharacterComma seperated list of database record rowids of last record in previous ReadQuery call, contains one rowid for each table in input parameter icTables. Is empty for first call.
iiLastRownuminputinteger
iiMaxNumberinputintegerMaximum number of records (in the temp-table) to retrieve.
Zero if the amount is unlimited.
A negative value if exactly one record must be loaded (the record with rowid found in icLastRowid).
Remark: if value is +1, also one record will be returned, but this will be the record following record found with icLastRowid.
icFieldConvertinputcharacterContains the information to know in which temp-table field the database field must be loaded (as opposed to class temp-tables, the field name will be different).
Format: '<buffer>.<db-field-1>,<tt-field-1>|<buffer>.<db-field-2>,<tt-field-2>|...'
icCustomFieldsinputcharacter
ilDistinctinputlogicalLoad only distinct values ?
ilForwardReadinputlogicalIndicates query should read forward.
olEofoutputlogicalWhen iiMaxNumber > 0, this parameter will be true when the last record of the query is included in the result set, or when no record was found at all.
When iiMaxNumber <= 0, this parameter will be only true when no record was found at all.
oiReturnStatusoutputinteger


Internal usage


unused


program code (program1/persistence.p)