Table of contents
Collapse the table of content
Expand the table of content

ReadyState Property Example (VBScript)

office 365 dev account|Last Updated: 4/3/2018
3 Contributors

Applies to: Access 2013 | Access 2016

The following example shows how to read the ReadyState property of theRDS.DataControl object at run time in VBScript code. ReadyState is a read-only property.

To test this example, cut and paste this code between the and tags in a normal HTML document and name it RDSReadySt.asp. Use Find to locate the file and place it in the directory you plan to use. ASP script will identify your server.

<!-- BeginReadyStateVBS --><%@ Language=VBScript %>
<% 'use the following META tag instead of><!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->
<meta name="VI60_DefaultClientScript" content=VBScript><meta name="GENERATOR" content="Microsoft Visual Studio 6.0">
<title>RDS.DataControl ReadyState Property</title><style>
<!--body {
font-family: 'Verdana','Arial','Helvetica',sans-serif;BACKGROUND-COLOR:white;
.thead {background-color: #008080;
font-family: 'Verdana','Arial','Helvetica',sans-serif;font-size: x-small;
color: white;}
.thead2 {background-color: #800000;
font-family: 'Verdana','Arial','Helvetica',sans-serif;font-size: x-small;
color: white;}
.tbody {text-align: center;
background-color: #f7efde;font-family: 'Verdana','Arial','Helvetica',sans-serif;
font-size: x-small;}
<body><H1>RDS.DataControl ReadyState Property</H1>
<H2>RDS API Code Examples </H2><HR>
<!-- RDS.DataControl with parameters set at design time --><OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID=RDS>
<PARAM NAME="SQL" VALUE="Select * from Orders"><PARAM NAME="SERVER" VALUE="http://<%=Request.ServerVariables("SERVER_NAME")%>">
<PARAM NAME="CONNECT" VALUE="Provider='sqloledb';Integrated Security='SSPI';Initial Catalog='Northwind'"><PARAM NAME="ExecuteOptions" VALUE="2">
<PARAM NAME="FetchOptions" VALUE="3"></OBJECT> 
<Script Language="VBScript"> 
Sub Window_OnLoad 
Select Case RDS.ReadyStatecase 2 'adcReadyStateLoaded
MsgBox "Executing Query"case 3 'adcReadyStateInteractive
MsgBox "Fetching records in background"case 4 'adcReadyStateComplete
MsgBox "All records fetched"End Select 
End Sub</Script> 
<!-- EndReadyStateVBS -->

Access for developers forum on MSDN
Access help on
Access help on
Search for specific Access error codes on Bing
Access forums on UtterAccess
Access wiki on UtterAcess
Access developer and VBA programming help center (FMS)
Access posts on StackOverflow

© 2018 Microsoft