Contents Index Topic Contents |
RDS.DataControl Object
The RDS.DataControl object binds a data query Recordset to one or more controls (for example, a text box, grid control, or combo box) to display the ADOR.Recordset data on a Web page.
Syntax
<OBJECT CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID="DataControl"
<PARAM NAME="Connect" VALUE="DSN=DSNName; UID=usr;PWD=pw;">
<PARAM NAME="Server" VALUE="http://awebsrvr">
<PARAM NAME="SQL" VALUE="QueryText">
</OBJECT>
Methods
Cancel, CancelUpdate, CreateRecordset, MoveFirst, MoveLast, MoveNext, MovePrevious, Refresh, Reset, SubmitChanges
Properties
Connect, ExecuteOptions, FetchOptions, FilterColumn, FilterCriterion, FilterValue, ReadyState, Recordset, Server, SQL, SortColumn, SortDirection, SourceRecordset
Remarks
The class ID for the RDS.DataControl object is BD96C556-65A3-11D0-983A-00C04FC29E33.
For a basic scenario, you only need to set the SQL, Connect, and Server properties of the RDS.DataControl object, which will automatically call the default business object, RDSServer.DataFactory.
All the properties in the RDS.DataControl are optional because custom business objects can replace their functionality.
Use one RDS.DataControl object to link the results of a single query to one or more visual controls. For example, suppose you code a query that requests customer data such as Name, Residence, Place of Birth, Age, and Priority Customer Status. You can use a single RDS.DataControl object to display a customer's Name, Age, and Region in three separate text boxes, Priority Customer Status in a check box, and all the data in a grid control.
Use different RDS.DataControl objects to link the results of multiple queries to different visual controls. For example, suppose you use one query to obtain information about a customer, and a second query to obtain information about merchandise the customer has purchased. You want to display the results of the first query in three text boxes and one check box, and the results of the second query in a grid control. If you use the default business object (RDSServer.DataFactory object), you need to do the following:
- Add two RDS.DataControl objects to your Web page.
- Write two queries, one for each SQL property of the two RDS.DataControl objects. One RDS.DataControl object will contain a SQL query requesting customer information, the second will contain a query requesting a list of merchandise the customer has purchased.
- In each of the bound control's OBJECT tags, specify the DATAFLD value to set the values for the data you want to display in each visual control.
There is no count restriction on the number of RDS.DataControl objects that you can embed via OBJECT tags on a single Web page.
When you define the RDS.DataControl object on a Web page, use non-zero Height and Width values such as 1 (to avoid the inclusion of extra space).
Remote Data Service 1.5 client components are already included as part of the Internet Explorer 4.0 installation, therefore you don't need to include a CODEBASE parameter in your RDS.DataControl object tag.
Microsoft Visual Basic Users The RDS.DataControl is only used in Web-based applications. A Visual Basic client application has no need for it.
See Also
Client-Side Data Cache, Client Tier, Developing Remote Data Service Applications, Displaying Data Through a Bound Control
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.