Responding to Client Data Requests
Go Up to Using Provider Components Index
Usually client requests for data are handled automatically. A client dataset or XML broker requests a data packet by calling GetRecords (indirectly, through the IAppServer interface). The provider responds automatically by fetching data from the associated dataset or XML document, creating a data packet, and sending the packet to the client.
The provider has the option of editing data after it has been assembled into a data packet but before the packet is sent to the client. For example, you might want to remove records from the packet based on some criterion (such as the user's level of access), or, in a multi-tiered application, you might want to encrypt sensitive data before it is sent on to the client.
To edit the data packet before sending it on to the client, write an OnGetData event handler. OnGetData event handlers provide the data packet as a parameter in the form of a client dataset. Using the methods of this client dataset, you can edit data before it is sent to the client.
As with all method calls made through the IAppServer interface, the provider can communicate persistent state information with a client dataset before and after the call to GetRecords. This communication takes place using the BeforeGetRecords and AfterGetRecords event handlers.
- Controlling What Information Is Included in Data Packets
- Responding to Client-generated Events
- Handling Server Constraints
- Responding to Client Update Requests
- Choosing How to Apply Updates Using a Dataset Provider
- Determining the Source of Data
- Communicating with the Client Dataset