This lesson assumes you have completed all preceding lessons. See Lesson 1: Compiling the CustdbScripts Java class with MobiLink references.
The class, CustdbScripts.class, created in the previous lesson encapsulates the methods UploadInsert and DownloadCursor. These methods contain implementations 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_java_table_script, specifying CustdbScripts.DownloadCursor to handle 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:
CALL ml_add_java_table_script( 'custdb 12.0', 'ULCustomer', 'download_cursor', '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. |
CustdbScripts.DownloadCursor | The fully qualified Java 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 the View menu, and choose Refresh All.
Close Interactive SQL.
Proceed to Lesson 5: Running the MobiLink server with -sl java.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |