Step 3: Server Obtains a Recordset (RDS Tutorial)

Microsoft ActiveX Data Objects (ADO)

Step 3: Server Obtains a 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

The server program uses the connect string and command text to query the data source for the desired rows. ADO is typically used to retrieve this Recordset, although other Microsoft data access interfaces, such as OLE DB, could be used. See the ADO Tutorial for a detailed explanation of how a query is performed.

A custom server program might look like this:

Public Function ServerProgram(cn as String, qry as String) as Object
Dim rs as New ADODB.Recordset
   rs.CursorLocation = adUseClient
   rs.Open qry, cn 
   rs.ActiveConnection = Nothing
   Set ServerProgram = rs
End Function

Next   Step 4: Server Returns the Recordset