Step 4: Server Returns the Recordset (RDS Tutorial)

Microsoft ActiveX Data Objects (ADO)

Step 4: Server Returns the Recordset (RDS Tutorial)

You are Here...

  • Specify the program to be invoked on the server, and obtain a proxy.

  • Invoke the server program. Pass parameters to the server program that identifies the data source and the command to issue.

  • The server program obtains a Recordset object from the data source, typically by using ADO.

  • The server program returns the final Recordset object to the client application.

  • On the client, the Recordset object is optionally put into a form that can be easily used by visual controls.

  • Changes to the Recordset object are sent back to the server and used to update the data source.

Discussion

RDS converts the retrieved Recordset object to a form that can be sent back to the client (that is, it marshals the Recordset). The exact form of the conversion and how it is sent depends on whether the server is on the Internet or an intranet, a local area network, or is a dynamic-link library. However, this detail isn't critical; all that matters is that RDS sends the Recordset back to the client.

On the client side, a Recordset object is returned and assigned to a local variable.

Sub RDSTutorial4()
   Dim DS as New RDS.DataSpace
   Dim RS as ADODB.Recordset
   Dim DF as Object
   Set DF = DS.CreateObject("RDSServer.DataFactory", "http://yourServer")
   Set RS = DF.Query("DSN=Pubs", "SELECT * FROM Authors")
...

Next   Step 5: DataControl is made usable