From RAD Studio API Documentation
Jump to: navigation, search


function InternalGetRecords(Count: Integer; out RecsOut: Integer;  Options: TGetRecordOptions; const CommandText: OleStr; var Params: OleVariant): OleVariant; override;


virtual System::OleVariant __fastcall InternalGetRecords(int Count, /* out */ int &RecsOut, Datasnap::Provider::TGetRecordOptions Options, const System::WideString CommandText, System::OleVariant &Params);


Type Visibility Source Unit Parent
function protected
Datasnap.Xmlxform TXMLTransformProvider


Provides the underlying implementation of the GetRecords method.

Datasnap.Xmlxform.TXMLTransformProvider.InternalGetRecords inherits from Datasnap.Provider.TCustomProvider.InternalGetRecords. All content below this line refers to Datasnap.Provider.TCustomProvider.InternalGetRecords.

Provides the underlying implementation of the GetRecords method.

The GetRecords method calls InternalGetRecords to assemble a data packet after calling DoBeforeGetRecords to apply the CommandText and Params and generate a BeforeGetRecords event. As implemented in TCustomProvider, InternalGetRecords always returns NULL. Descendant classes override this method to fetch the requested records and assemble them into a data packet.

Count indicates the number of records to retrieve. If Count is -1, all records are retrieved. If Count is 0, only metadata is retrieved. If Count is greater than 0, only the specified number of records are retrieved.

RecsOut returns the actual number of records retrieved.

Options indicates what information should be added to the data packet in addition to data. It can include grMetaData (include metadata), grReset (start providing records with the first one in the dataset), and grXML (encode the datapacket in XML rather than as an OleVariant) or grXMLUTF8 (same as grXML except extended characters are encoded using UTF8).

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 specifies any parameter values that should be applied to CommandText or to an associated query or stored procedure. If the provider is associated with a TTable object, Params specifies field values that filter the result set. On exit from GetRecords, Params returns any output parameters.

Records are returned as a data packet in a Variant.

See Also