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

SQL Anywhere 11.0.1 (中文) » MobiLink - 服务器管理 » MobiLink 服务器 API » 使用 Java 语言编写同步脚本 » 用于 Java 的 MobiLink 服务器 API 参考 » DownloadTableData 接口

 

getLastDownloadTime 方法

语法
public java.sql.Timestamp getLastDownloadTime( )
注释

返回此表的上次下载时间。传递给几个表格下载事件的上次下载时间是相同的。

上次下载时间对于生成用于某个特定同步的表下载数据很有用。

返回值

此下载表的上次下载时间。

另请参见
示例

以下示例为代码片段,它以使用上次下载时间的插入项填充下载的表。请注意,此示例假定您拥有一个名为 _cc 的 DBConnectionContext 实例。

// 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);
    inserts_rs.close();

    // ... 
}