Returns a UpdateResultSet object representing update operations uploaded by a MobiLink client. Each update is represented
by one row including all column values. UpdateResultSet extends java.sql.ResultSet to include special methods for MobiLink
conflict detection.
Assume your remote client contains a table called remoteOrders. The following example uses the UploadedTableData.getUpdates
method to obtain a result set of updated rows. The code obtains the order amount for each row.
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 instance representing the remoteOrders table.
UploadedTableData remoteOrdersTable = ut.getUploadedTableByName("remoteOrders");
// Get inserts uploaded by the MobiLink client.
java.sql.ResultSet rs = remoteOrdersTable.getUpdates();
while (rs.next()) {
// Get the uploaded order_amount.
double order_amount = rs.getDouble("order_amount");
// ...
}
rs.close();
}