PROPERTY:  DataControl::FetchOptions

adcFetchOptionEnum = datacontrolobject.FetchOptions
datacontrolobject.FetchOptions = adcFetchOptionEnum


The FetchOptions property sets or returns one of the adcFetchOptionEnum constants that specify exactly when control will be returned to the calling program for an asynchronous fetch.

You can use the ExecuteOptions property to specify whether execution of a query will be asynchronous or synchronous.

adcFetchOptionEnum Constants
Constant Value Description
adcFetchAsync 3 Default, control is returned immediately and all records will be fetched in the background
adcFetchBackground 2 Control is returned as soon as the first batch is fetched and the remaining records will be fetched in the background
adcFetchUpFront 1 All records are fetched before control is returned

 
If adcFetchBackground is in effect and you attempt to access a record that has not yet been retrieved, control will be returned to the calling program as soon as the specified record has been retrieved, but not sooner.

If adcFetchAsync is in effect and you attempt to access a record that has not yet been retrieved, control will be immediately returned. Obviously, you will not be able to retrieve a record that has not yet been fetched. You can check on the progress by using the ReadyState property or the onReadyStateChange event.

You can create a form on a Web page to input values for the various DataControl properties and use Request.Form( ) to assign the values:

Code (VBScript):
objDC.ExecuteOptions = Request.Form("ExecuteOptions")
objDC.FetchOptions = Request.Form("FetchOptions")
objDC.InternetTimeout = Request.Form("InternetTimeout")
objDC.Server = Request.Form("Server.Value")
objDC.SourceRecordset = Request.Form("SourceRecordset")
objDC.SQL = Request.Form("SQL")
objDC.URL = Request.Form("URL")
objDC.Connect = Request.Form("Connect")
objDC.Refresh

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information