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

SQL Anywhere 11.0.1 (Français) » MobiLink - Server Administration » MobiLink Server APIs » Writing synchronization scripts in Java » MobiLink server API for Java reference » UploadedTableData interface

 

getDeletes method

Syntax
public java.sql.ResultSet getDeletes( )
Remarks

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

Returns

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

See also
Example

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 ianywhere.ml.script.*;
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 (delete_rs.next()) { 
         // Get primary key values for deleted rows.
         int deleted_id = delete_rs.getInt(1);
   
         // ...
    }
    delete_rs.close();
}