The Address Book application uses the AdvancedDataControl object to bind data from the SQL Server database to a visual object (in this case, a grid display) in the application's client HTML page. The event-driven VBScript program logic uses the AdvancedDataControl to:
The following code defines the AdvancedDataControl component:
<OBJECT CLASSID="clsid:9381D8F2-0288-11d0-9501-00AA00B911A5"
ID="SControl"
CODEBASE="HTTP://<%=Request.ServerVariables("SERVER_NAME")%>/MSADC/msadc11.cab"
WIDTH=1 HEIGHT=1>
<PARAM NAME="Bindings" VALUE="Grid1;">
<PARAM NAME="Connect" VALUE="DSN=ADCDEMO;UID=adcdemo;PWD=adcdemo;">
<PARAM NAME="Server" VALUE="http://<%=Request.ServerVariables("SERVER_NAME")%>">
</OBJECT>
The OBJECT tag defines the AdvancedDataControl component in the program. The tag includes two types of parameters:
The following tables describes the parameters associated with the OBJECT tag.
| Parameter | Description |
| CLASSID | A unique, 128-bit number that identifies the type of embedded object to the system. This identifier is maintained in the local computer's system registry. (For the class IDs of the AdvancedDataControl object, see the AdvancedDataControl Object in the API Reference.) |
| ID | Defines a document-wide identifier for the embedded object that is used to identify it in code. |
| CODEBASE |
Specifies the location of a source file of the object being called, if it is not on your local computer. In this case, CODEBASE specifies the location of the data-binding control. The program uses Active Server Page script (the code enclosed by the <% and %> signs) to specify the server name part of the URL for the client. |
| WIDTH and HEIGHT | Identifies the dimensions of the control, in pixels. Because this is a nonvisual control, the values of these parameters can be set to 1 for each. |
The following table describes the parameters specific to the AdvancedDataControl object. (For a complete list of the AdvancedDataControl object parameters, and when to implement them, see the AdvancedDataControl object in the API Reference.)
| Parameter | Description |
| BINDINGS |
Specifies the ID of the ActiveX objects to which the AdvancedDataControl binds data. In the Address Book application, this is a grid object, Grid1. |
| SERVER |
If you are using HTTP, the value is the name of the server computer preceded by HTTP://. |
| CONNECT |
The first part of this VALUE indicates the System DSN that points to the data source; the second and third parts specify the user ID and password needed to access the data source (for example, "DSN=ADCDEMO;UID=adcdemo;PWD=adcdemo;"). If you need assistance, your system database administrator can probably provide the information for you. |
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.