getInserts method

Syntax
public java.sql.ResultSet getInserts( )
Remarks

Returns a java.sql.ResultSet object representing insert operations uploaded by a MobiLink client. Each insert is represented by one row in the result set.

Returns

A java.sql.ResultSet object representing insert operations uploaded by a MobiLink client.

See also
Example

Assume your remote client contains a table called remoteOrders. The following example uses the DownloadTableData.getInserts method to obtain a result set of inserted rows. The code obtains the order amount for each row in the current upload transaction.

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.getInserts();
    while( rs.next() ) { 

    // get the uploaded order_amount
    double order_amount = rs.getDouble("order_amount"); 

    // ...
 
  }
  rs.close();
}