RDS Data Path
The illustration in this topic shows the path data takes from the SQL Server database to the client when it is retrieved in each of two ways: making a call to ADO and OLEDB, and using an RDS customization handler.
The numbered steps are explained following the diagram, in Steps in RDS Data Retrieval (No Handler), Steps in RDS Data Retrieval (Using a Handler), and Displaying Returned Data.
Steps in RDS Data Retrieval (No Handler)
This procedure uses a query to ADO and OLEDB, not an RDS handler. The next procedure shows how the events change when an RDS handler is used. At this point, the RDS.Refresh method has just been called and the SQL query sent.
To see how these steps fit into the data-retrieval process, follow the numbered steps on the left side of the following diagram.
To retrieve data without a handler
- The RDS Data Control, on an ASP page, issues a query for data.
- The RDS Data Space object passes the query to the Datafactory object on the server computer.
- The Datafactory object's Query method, through ADO and OLEDB, now creates…
- … a new recordset of data from the FmLib database, matching the request issued from the ASP page.
- The recordset is sent to the Data Space object (an area of memory on the client computer), which caches the recordset data locally.
- The RDS Data Space object sends the cached data to the RDS data control, which binds the data through dynamic binding to an HTML table. See Displaying Returned Data.
Steps in RDS Data Retrieval (Using a Handler)
This procedure uses a query with an RDS handler, not through ADO and OLEDB. Using handlers changes only server-side functioning, not client-side functioning. At this point, the RDS.Refresh method has just been called and the SQL query sent.
In the ASP page on which this query is issued, the following line of code has instructed the RDS data factory object to use a handler customization file, and it specifies which customization file (FmLibMap.ini) to use:
RDS.Handler = "MSDFMAP.Handler,FmLibMap.ini"
To see how these steps fit into the data-retrieval process, follow the numbered steps on the right side of the preceding diagram.
To retrieve data using a handler
- The RDS Data Control, on an ASP page, issues a query for data.
- The RDS Data Space object passes the query to the Datafactory object on the server computer. Because in this case the ASP file already has instructed the Datafactory object to use a handler, the DATAFACTORY registry setting will not determine whether a handler is to be used.
- Information is requested from the handler customization file.
- The connection string is retrieved from the handler customization file. This string identifies the database to open and query.
- Through the Datafactory.GetRecordset method, ADO is queried (and through it, ADODB and SQL Server).
- A new recordset of data from the FmLib database, which matches the request issued from the ASP page, is created and returned to the Datafactory object.
- The recordset is sent to the Data Space object (an area of memory on the client computer), which caches the recordset data locally.
- The RDS Data Space object sends the cached data to the RDS data control, which binds the data through dynamic binding to an HTML table. See Displaying Returned Data.
Displaying Returned Data
Now that the data is on the client computer, it is displayed through the Web browser using DHTML data binding.
- DHTML binding agents bind the RDS data control with an HTML table (or to the DHTML data grid, an element used to make data visible in an HTML table). This is accomplished through the Datasrc argument in the <table> tag: <Table Datasrc=#<RDS_Control> … , where <RDS_Control> is the name of the RDS control in use for this particular data display, such as (in the CML application), RDS_Author or RDS_Subject. The CML application uses a span tag here: <SPAN Datafld="Title"></SPAN>. In the <table> tag we have to use Datasrc in order to indicate the ID of the data control. These data controls have already been instantiated; see step 1.
- Clean up with the statements RDS.Close and Set RDS=Nothing.