RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSoapDataModule.AS_GetRecords Method

Returns a data packet that contains the specified data.

Pascal
function AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut: Integer; Options: Integer; const CommandText: WideString; var Params: OleVariant; var OwnerData: OleVariant): OleVariant; safecall;
C++
__fastcall OleVariant AS_GetRecords(const BSTR ProviderName, int Count, int RecsOut, int Options, const BSTR CommandText, OleVariant Params, OleVariant OwnerData);

Call AS_AS_GetRecords to retrieve a specified number of records. AS_AS_GetRecords returns the requested records, starting with the current record of the provider's dataset. Because SOAP data modules are stateless, you may need to reposition the cursor or re-execute a query or stored procedure in the provider's BeforeAS_GetRecords event handler. 

ProviderName gives the name of the provider component that provides the records.  

Count indicates the number or type 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 Count 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 is a combination of the GetRecordOption constants. For example, the following value requests metadata along with a data packet encoded in XML:

 

CommandText specifies an optional SQL statement that replaces the SQL of the provider's query, or the name of a table or stored procedure that replaces the provider's underlying database table or stored procedure. This parameter is ignored if the provider's Options property does not include poAllowCommandText. 

Params is a Variant containing any parameters that should be passed to the provider's dataset before it executes to generate the requested data. It returns any output parameters. 

OwnerData contains custom information that is supplied by a client dataset's BeforeAS_GetRecords event handler. This information is passed to the provider's BeforeAS_GetRecords event handler. OwnerData returns information supplied by the provider's AfterAS_GetRecords event handler. 

Records are returned as a data packet in a Variant (as the return value in Delphi or the AS_GetRecords_result parameter in C++).

Note: Applications can only call the protected AS_AS_GetRecords method using the IAppServer interface. To fetch records directly in code from the application server, use the provider component's AS_GetRecords method.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!