MDAC 2.5 SDK - ADO


 

ExecuteOptions and FetchOptions Properties Example (VBScript)

See Also

The following code shows how to set the ExecuteOptions and FetchOptions properties at design time. If left unset, ExecuteOptions defaults to adcExecSync. This setting indicates that when the ADC.Refresh method is called, it will be executed on the current calling thread—that is, synchronously.

<OBJECT CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID="ADC1">
.
<PARAM NAME="SQL" VALUE="Select * from Sales">
<PARAM NAME="Connect" VALUE="DSN=Pubs;UID=sa;PWD=;">
<PARAM NAME="Server" VALUE="http://MyWebServer">
<PARAM NAME="ExecuteOptions" VALUE="1">
<PARAM NAME="FetchOptions" VALUE="3">
.
</OBJECT>

The following example shows how to set the ExecuteOptions and FetchOptions properties at run time in VBScript code. See the Refresh method for a working example of these properties.

<Script Language="VBScript">
<!--
Const adcExecSync = 1
Const adcFetchAsynch = 3

Sub ExecuteHow
  ' Execute next refresh of Recordset asynchronously 
  ' to the calling thread.
  RDS1.ExecuteOptions = adcExecSync
  RDS1.FetchOptions = adcFetchAsynch
  RDS.Refresh
End Sub
-->
</Script>