Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » MobiLink - Server Administration » MobiLink Server APIs » Writing synchronization scripts in Java » MobiLink server API for Java Reference » UploadedTableData interface


getDeletes method

public java.sql.ResultSet getDeletes( )

Returns a java.sql.ResultSet object representing delete operations uploaded by a MobiLink client. The result set contains primary key values for deleted rows.


A java.sql.ResultSet object that represents delete operations uploaded by a MobiLink client.

See also

Assume your remote client contains a table called remoteOrders. The following example uses the DownloadTableData.getDeletes method to obtain a result set of deleted rows. In this case, the delete result set includes a single primary key column.

import java.sql.*;

// ...

  // The method used for the handle_UploadData event.

  public void HandleUpload( UploadData ut )
    throws SQLException, IOException {
   // Get an UploadedTableData for the remoteOrders table.
   UploadedTableData remoteOrdersTable = ut.getUploadedTableByName("remoteOrders");
   // Get deletes uploaded by the MobiLink client.
   java.sql.ResultSet delete_rs = remoteOrdersTable.getDeletes();

    while( ) { 

      // Get primary key values for deleted rows.
      int deleted_id = delete_rs.getInt(1);

      // ...