View comments | RSS feed

RecordSet.setDeliveryMode

Availability

Usage

RecordSet.setDeliveryMode(mode, pagesize, numPrefetchPages)

Parameters

Parameter
Description
mode
Identifies the delivery mode. The options are ondemand (default), fetchall, and page.
pagesize
(Optional) In page mode, what the page size is in fetchall mode, how many records to fetch in each server request. The default is 25.
numPrefetchPages
(Optional) In page mode, the number of pages to prefetch. The default is 0, fetch only the required page.

Return value

Nothing.

Description

Method. Changes the delivery mode of a record set associated with an application server. At any time, a RecordSet object associated with an application server is operating in a particular data-delivery mode. The new mode setting takes effect immediately, except that pending application server requests are allowed to complete. You can change mode settings and delivery mode parameters.

Until you call this method for a RecordSet object, it operates in ondemand mode. When using fetchall mode, you can supply a pagesize parameter. The entire record set will be fetched from the application server in a series of requests, and each request will fetch only the number of records specified in the pagesize parameter.

When using page mode, you can supply the pagesize and preFetchPages parameters. In page mode, when you request a record using the getItemAt method, the RecordSet object ensures that numPrefetch pages after the page containing the requested record are either already available in the client or requested from the server. If numPrefetch pages is zero, only the current page containing the requested record is fetched.

When the RecordSet object is fully populated, the setDeliveryMode method has no effect.

Error handling

Error condition
What happens
Error message
Unknown mode string
No change is made to the RecordSet object, and an error message is reported to the Output Window and Debug Console.
SETDELIVERYMODE: unknown mode string

Example

The following examples demonstrate the setDeliveryMode method:

myRecordSet.setDeliveryMode("fetchall");
myRecordSet.setDeliveryMode("page", 25, 2);

See also

RecordSet.getItemAt, RecordSet.isFullyPopulated

Comments


FlashHack said on Jul 26, 2005 at 11:26 AM :
Anyone got anymore information on this method? It doesn't seem to work very well and the examples leave alot to be desired...

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flashremoting/mx/Using_Flash_Remoting_MX/asDict41.htm