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