INFO: Comparing RDS Technology to RDO and DAOLast reviewed: October 3, 1997Article ID: Q165804 |
The information in this article applies to:
SUMMARYNOTE: With version 1.5, the Remote Data Service (RDS) was renamed and merged with ActiveX Data Objects (ADO) to provide data remoting within the same programming model as ADO. Formerly, the Remote Data Service was known as the Advanced Data Connector (ADC). To clarify the relationship of ADC to ADO, ADC is now known as the Remote Data Service (RDS), a feature of ADO. Q. Is the Advanced Data Connector superior to RDO and DAO in getting at SQL data in a client-server application?A. RDO and DAO are designed for a persistent sockets/pipes connection to your database server. The Remote Data Service (RDS) works disconnected via HTTP over your intranet or the Internet through firewalls. RDS also works over DCOM but this discussion focuses on HTTP. RDS passes a disconnected recordset to the client. This is a completely stateless model, which means the server could actually be shut down and restarted between RDS client requests. This is done via a Mime64 encoded ADTG (Advanced Data Tablegram) passed to the client, which then opens it and loads it into a client-side VTM (Virtual Table Manager). At this time the client can walk the recordset, perform updates, and send the changes back to the server for base table updates. RDO and DAO work in-process on the local machine or possibly over a LAN via DCOM if you wrap their functionality in a Visual Basic ActiveX EXE. Currently DCOM does not support transport over HTTP so it is impossible to pass a recordset through a firewall. Attempting to marshal a recordset and its interfaces over DCOM to the client is also unacceptably slow and will ultimately fail. Your alternative is to pass the recordset from the server to the client as a variant array (GetRows), which works well, but is very primitive compared to RDS technology. RDS also provides the support necessary to bind to data-aware OCXs in Microsoft Internet Explorer 3.0 (IE3), support that is not built into IE3. This data binding functionality is very similar to the Visual Basic Data Control and Remote Data Control, which require very little or no code. MORE INFORMATIONThe following example code demonstrates how the RDS can retrieve disconnected recordsets over the Internet from a Visual Basic program. Although late binding to the AdvancedDataSpace is used in this example to keep it simple, you may want to consider early binding because it provides two big wins: performance and type checking. The performance may not be noticeable, but the improvements in the type checking and the robustness of the run-time error checking make it worthwhile.
Dim RS As Object 'Disconnected Recordset Dim ADS As Object 'AdvancedDataSpace Dim ADF As Object 'AdvancedDataFactory Private Sub Form_Load() Set ADS = CreateObject("AdvancedDataSpace") Set ADF = ADS.CreateObject("AdvancedDataFactory", _ "http://www.myserver.com") 'This query returns a recordset over HTTP Dim strCn As Variant, strSQL As Variant strCn = "dsn=pubs;uid=sa;pwd=" strSQL = "Select * From Authors" Set RS = ADF.Query(strCn, strSQL) RS.MoveNext 'Walk Recordset Debug.Print RS(0) 'Print Row 1, Col 1 to Debug Window End Sub REFERENCESFor a more detailed example of this code, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q165297 TITLE : RDS: How To Use From Inside a Visual Basic ProgramThe RDS Web site: http://www.microsoft.com/rds RDS Help, Mrds10.hlp (contained in the self-extracting RDS installation file, Mrds10.exe). (c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Jon Fowler, Microsoft Corporation Keywords : VBKBADC VBKBDB VBKBInet Version : 3.0 1.0 1.1 1.5 Platform : NT WINDOWS Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |