Getting a Recordset with the RDS.DataControl Object

   

You can open a disconnected Recordset by setting the RDS.DataControl object's Connect, Server, and SQL properties.

The following code shows how to set these properties at design time:

<OBJECT CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID="ADC1">
   <PARAM NAME="SQL" VALUE="Select * from Products">
   <PARAM NAME="Connect" VALUE="DSN=AdvWorks;">
   <PARAM NAME="Server" VALUE="http://SalesWeb/">
</OBJECT>

Calling the Refresh method after setting these properties on the RDS.DataControl automatically calls the RDSServer.DataFactory object "behind the scenes," and Remote Data Service returns a Recordset object to the client. You don't have to actually write any code to use the RDSServer.DataFactory, but if you do want to do this, see "Getting a Recordset with the RDSServer.DataFactory Object."