MDAC 2.5 SDK - ADO


 

RDS Tutorial (VJ++)

See Also

ADO/WFC doesn't completely follow the RDS object model in that it does not implement the RDS.DataControl object. ADO/WFC only implements the client-side class, RDS.DataSpace.

The DataSpace class implements one method, CreateObject, which returns an ObjectProxy object. The DataSpace class also implements the InternetTimeout property.

The ObjectProxy class implements one method, call, which can invoke any server-side business object.

This is the beginning of the tutorial.

import com.ms.wfc.data.*;
public class RDSTutorial 
{
   public void tutorial()
   {
// Step 1: Specify a server program 
      ObjectProxy obj = 
         DataSpace.createObject(
            "RDSServer.DataFactory", 
            "http://YourServer");

// Step 2: Server returns a Recordset 
      Recordset rs = (Recordset) obj.call(
            "Query", 
            new Object[] {"DSN=Pubs;", "SELECT * FROM Authors"});

// Step 3: Changes are sent to the server 
      ...                        // Edit Recordset
      obj.call(
            "SubmitChanges", 
            new Object[] {"DSN=Pubs;", rs});   
      return;
   }
}

This is the end of the tutorial.