Creating an rdoResultset Object Programmatically

In some cases you might need to create an rdoResultset independently of the RemoteData control, but still need to access the columns of the result set using bound controls. In this situation, simply create an rdoResultset and assign it to the RemoteData control's Resultset property.

Note   The Resultset property is only available at run time.

You can also create the RemoteData control's rdoResultset programmatically by setting the RemoteData control's properties in code and using the Refresh method. Any existing RemoteData control's rdoResultset is discarded.

The RDO objects created by the RemoteData control can be manipulated independently of the control — with or without bound controls. The rdoConnection and rdoResultset objects each have properties and methods of their own that you can use with your procedures. In addition, the RemoteData control exposes the Environment, Connection, RowsetSize, and several other properties used to create the rdoResultset — which is exposed through the Resultset property.

For example, the MoveNext method of an rdoResultset object moves the current row to the next row in the rdoResultset. To invoke this method with an rdoResultset created by a RemoteData control, you could use this code:

MSRDC1.Resultset.MoveNext

If you need to execute a parameter query using the RemoteData control, create an rdoResultset based on an rdoQuery, and then set the RemoteData control's Resultset property to the newly created rdoResultset. You can also use this technique to access another rdoEnvironment.