本课假定您已完成前面的所有课程。 请参见第 1 课:使用 MobiLink 参考编译 CustdbScripts Java 类。
上一课中创建的 CustdbScripts.class 类封装了 UploadInsert 和 DownloadCursor 方法。这些方法分别包含 ULCustomer upload_insert 和 download_cursor 事件的实现。
在本课中,您将通过 Interactive SQL 连接到 CustDB 数据库并运行 ml_add_java_table_script,从而指定 CustdbScripts.DownloadCursor 来处理 download_cursor 事件。
从 Interactive SQL 连接到示例数据库。
单击 [开始] » [程序] » [SQL Anywhere 12] » [管理工具] » [Interactive SQL],或运行以下命令:
dbisql |
单击 [ODBC 数据源名称],然后键入 SQL Anywhere 12 CustDB。
单击 [连接]。
在 Interactive SQL 中执行以下 SQL 语句:
CALL ml_add_java_table_script( 'custdb 12.0', 'ULCustomer', 'download_cursor', 'CustdbScripts.DownloadCursor'); COMMIT; |
以下是对每个参数的说明:
参数 | 说明 |
---|---|
custdb 12.0 | 脚本版本。 |
ULCustomer | 同步表。 |
download_cursor | 事件名称。 |
CustdbScripts.DownloadCursor | 完全限定的 Java 方法。 |
更新的 download_cursor 脚本可能不会出现在 Sybase Central 中。要在 Sybase Central 中查看 MobiLink 项目的最新更改,请单击 [视图] 菜单,然后选择 [全部刷新]。
关闭 Interactive SQL。
![]() |
使用DocCommentXchange讨论此页。
|
版权 © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |