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 » DownloadTableData interface


getLastDownloadTime method

public java.sql.Timestamp getLastDownloadTime( )

Returns last download time for this table. This is the same last download time passed to several of the per table download events.

The last download time is useful for generating the table download data for a particular synchronization.


The last download time for this download table.

See also

The following example is a snippet of code that populates a table in the download with inserts using the last download time. Note that this example assumes you have a DBConnectionContext instance called _cc.

  // The method used for the handle_DownloadData event
public void handleDownload() throws SQLException {

  // Get the DownloadData for the current synchronization.
  DownloadData my_dd = _cc.getDownloadData();
  // Get the DownloadTableData for the remoteOrders table.
  DownloadTableData td = my_dd.getDownloadTableByName("remoteOrders");
  // get the inserts given a last download time
  ResultSet inserts_rs  = 
   makeInsertsFromTimestamp( td.getLastDownloadTime() );
  // fill the DownloadTableData using the inserts resultset.
  setDownloadInsertsFromRS(td, inserts_rs );

  // ...