To handle direct downloads, complete the following steps:
To handle direct downloads
Register a Java or .NET method for the handle_UploadData connection event.
Write a method for the handle_DownloadData synchronization event. In this event you use an instance of DBConnectionContext to get a DowloadData instance for the current synchronization. See:
You can create the entire direct download in the handle_DownloadData synchronization event. Alternatively, you can use other synchronization events to set direct download operations. However, you must create a handle_DownloadData script, even if its method does nothing. If you process the direct download in an event other than handle_DownloadData, the event cannot be before begin_synchronization and cannot be after end_download.
For information about the order of events, see MobiLink complete event model.
The MobiLink server APIs for Java and .NET provide the following classes for creating direct downloads:
DownloadData Encapsulates download tables containing operations to send down to a remote client during synchronization. See:
DownloadTableData Encapsulates upsert (update and insert) and delete operations to download to a MobiLink client.
For Java, DownloadTableData methods return an instance of a JDBC PreparedStatement. In Java, you add a row to the download by setting the prepared statement's column values and then executing the prepared statement.
For .NET, DownloadTableData methods return an instance of a .NET IDbCommand. In .NET, you add a row to the download by setting the command's column values and then executing the command.
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|