CML Data Access Using RDS
The CML application uses RDS ActiveX controls to display search results to the library user. The only component of CML that uses RDS is the Search.cls object. It retrieves results of an SQL query and creates a DHTML table displayed at the browser. The following diagram shows how this happens.

The preceding diagram shows the steps executed in the process of displaying database data to a browser user by means of RDS ActiveX controls running on the client computer.

Note The CML application's RDS ActiveX object queries the SQL database (through ADO) directly. The CML application never calls a stored procedure from the RDS ActiveX control, and RDS controls are not called by the Search COM component.
In this process, step 1 is the input of search words by a library user, using a form. This and the other steps are described here:
- Enter search words. The library user enters search words through a text box on a form on the ASP page Dsearch.asp.
- Submit search string. When the user clicks the Search button, the script in the Library.asp page collects those words and sends them in a Get command (in the URL address) through the ifControl IFrame to ASP on the Web server. It is in this step that the server receives the query's parameters. When the source URL for the IFrame is changed to Search.asp, that page is retrieved from the Web server. When the Web server receives the page, it runs it and in doing so unpacks and uses the URL parameters.
- Create table. The Search COM component is instantiated in Search.asp. This object parses the search string and, using a stored procedure in the FmLib database, creates a table of search results.
- Return script to the client. The same ASP page returns client-side script in SQL directly to the client. In other words, after the search string is submitted to the IFrame, script appears at the client in the IFrame. This step is the actual display of search results. All this returned script references and manipulates the parent ASP page (Library.asp). (A "parent" is a named object in the DHTML document object model. HTML intrinsic objects — such as IFrames — are "children" of parent objects, and thus can be controlled, or control other objects, through their common parent.)