public java.sql.ResultSet getInserts( )
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.
A java.sql.ResultSet object representing insert operations uploaded by a MobiLink client.
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(); } |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |