This lesson assumes you have completed all preceding lessons. See Lesson 1: Compiling the CustdbScripts.dll assembly with MobiLink references.
The class, CustdbScripts.dll, created in a previous lesson, encapsulates the methods UploadInsert and DownloadCursor. These methods contain implementation for the ULCustomer upload_insert and download_cursor events, respectively.
In this lesson, you connect to the CustDB database with Interactive SQL and run ml_add_dnet_table_script, specifying MLExample.CustdbScripts.DownloadCursor for the download_cursor event.
Connect to the sample database from Interactive SQL.
Click Start » Programs » SQL Anywhere 12 » Administration Tools » Interactive SQL, or run the following command:
dbisql |
Click ODBC Data Source Name and type SQL Anywhere 12 CustDB.
Click Connect.
Execute the following SQL statements in Interactive SQL to specify .NET methods to handle ULCustomer table-level events:
CALL ml_add_dnet_table_script( 'custdb 12.0', 'ULCustomer', 'download_cursor', 'MLExample.CustdbScripts.DownloadCursor'); COMMIT; |
The following is a description of each parameter:
Parameter | Description |
---|---|
custdb 12.0 | The script version. |
ULCustomer | The synchronized table. |
download_cursor | The event name. |
MLExample.CustdbScripts.DownloadCursor | The fully qualified .NET method. |
Your updated download_cursor script might not appear in Sybase Central. To view the most recent changes to the MobiLink project in Sybase Central, click View » Refresh All.
Close Interactive SQL.
Proceed to Lesson 5: Running the MobiLink server with -sl dnet.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |