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 参考 » DownloadData 接口

 

getDownloadTableByName 方法

语法
public DownloadTableData getDownloadTableByName(
string table-name);
注释

为此同步获取指定的下载表。如果此同步中不存在具有指定名称的表,则会返回空值。

参数
  • table_name   想要获取其下载数据的表的名称。

返回值

返回表示指定表的 DownloadTableData 实例,或者如果当前同步中不存在具有指定名称的表,则返回空值。

另请参见
示例

以下示例使用 getDownloadTableByName 方法来返回 remoteOrders 表的 DownloadTableData 实例。

注意

此示例假定您拥有一个名为 _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 my_download_table = my_dd.getDownloadTableByName("remoteOrders");
 
    // ... 
}