RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLBroker.OnRequestRecords Event

Occurs when the XML broker needs to fetch a data packet from its associated provider.

Pascal
property OnRequestRecords: TRequestRecordsEvent;
C++
__property TRequestRecordsEvent OnRequestRecords;

Write an OnRequestRecords event handler to provide an alternate mechanism for providing XML data packets or to perform other actions whenever the XML broker needs to fetch an XML data packet. For example, the OnRequestRecords event handler might call GetXMLRecords to fetch an XML data packet from the application server and then edit its contents. 

OnRequestRecords occurs when the InternetExpress page producer requests an XML data packet (usually in response to a request message) or when the application calls the XML broker's RequestRecords method. 

The Sender parameter is the object that originates the request (usually an InternetExpress page producer). 

Request is the request message that prompted the request for an XML data packet. This value may be nil (Delphi) or NULL (C++) if the request did not arise from a page producer or if the page producer is not processing a request message. 

OwnerData contains an application-defined variant that is sent to the provider's BeforeGetRecords event handler. The InternetExpress page producer that is requesting records or the caller of RequestRecords may initialize this value. OwnerData can be used to pass persistent state information to a stateless application server (for example, the first record that should appear in the data packet when MaxRecords is greater than 0). 

Records optionally returns an XML data packet as a string. If Records is an empty string on exit from the event handler, the XML broker automatically fetches the XML data packet from its associated provider. Otherwise, the XML broker uses the value of Records as the new XML data packet. 

 

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