Request_Read - BaseData_Set

Finds on specified table using given find mode and index

Type: Procedure

Parameters: Integer eFindMode Integer iFile integer iIndex

ParameterDescription
eFindModeMay be any of the standard find modes, i.e., lt, le, eq, ge, or gt, or it may be either Next_Record, First_Record, or Last_Record
iFileNumber of the table to perform find operation on
iIndexNumber of table index to use for find operation


Syntax
Procedure Request_Read Integer eFindMode Integer iFile integer iIndex

Call: Send Request_Read eFindMode iFile iIndex


Description

The Request_Read procedure finds on specified table using given find mode and index. If find is successful, performs a relate on the table. If the passed in table is the same as this object's Main_File, sends Relate_Main_File. Notifies other connected DataDictionary objects (DDOs) of the result of the find. Sets the Found indicator to reflect the success or failure of the find operation. Sent by DEOs and Item_Find.

When finding using Request_Read, the DDO does not latch on to the new record. CurrentRowId (Current_Record) and the buffer values do not change. So, you use the Request_Read message when you want to find a record using DD finding logic (constraints, custom relates, etc) but you do not want the DD to get changed. For example, a dbGrid needs to find a record for each row but it only updates the DD one time with the current record. So the dbGrid uses Request_Reads to fill itself and uses Find to latch on to the current record.

If you send this message to a DDO from the program (rather than from a DEO), precede this with Entry_Update 0 1 to make sure the table buffer contains the record you intend to act on.

Request_Read uses data in the global record buffer as a starting point. For example, if the global record buffer for Customer_Number has 7 in it, performing a Request_Read will find the next record in index 1 (so 8 unless DD constraints prohibit this).

Move 7 to Customer.Customer_Number
Send Request_Read to oCustomerDataDictionary GT Customer.File_Number 1
Send Info_Box Customer.Customer_Number


Data Dictionary SQL Filters

Data Dictionary SQL Filters can be used with this method. See pbUseDDSQLFilters for more information.

Notes

Find mode Next_Record will use the same find direction as the prior Find operation. Using find mode Next_Record must be preceded by a find using one of the other modes, or it will result in an error.