Datasnap.Provider.TCustomProvider.DoBeforeGetRecords
Delphi
procedure DoBeforeGetRecords(Count: Integer; Options: Integer;
const CommandText: OleStr; var Params, OwnerData: OleVariant); virtual;
C++
virtual void __fastcall DoBeforeGetRecords(int Count, int Options, const System::WideString CommandText, System::OleVariant &Params, System::OleVariant &OwnerData);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | Datasnap.Provider.pas Datasnap.Provider.hpp |
Datasnap.Provider | TCustomProvider |
Description
Generates a BeforeGetRecords event.
The GetRecords method calls DoBeforeGetRecords to generate the BeforeGetRecords event before it fetches data and assembles it into a data packet.
Count is the number of records requested. If Count is –1, all records are requested.
Options indicates whether the data packet should include metadata, whether it should start with the first record, and whether the data packet should be encoded in XML. For details, see the GetRecords method.
CommandText specifies an optional SQL statement that replaces the SQL of an associated query, or the name of a table or stored procedure that replaces the associated table or stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText or if the provider does not have an Options property.
Params contains any parameter values that should be applied to CommandText or to a query or stored procedure before fetching data into a data packet.
OwnerData supplies custom information to the BeforeGetRecords event handler. The event handler can change this value. The returned value is then passed to an AfterGetRecords event handler and then (optionally) returned to the caller of the GetRecords method.
As implemented in TCustomProvider, Count, Options, CommandText, and Params are ignored. Descendant classes can apply these values before generating the BeforeExecute event.