When you use non-blocking download acknowledgement, this script provides a place to record the information that a publication has been successfully downloaded.
In the following table, the description provides the SQL data type. If you are writing your script in Java or .NET, you should use the appropriate corresponding data type. See SQL-Java data types and SQL-.NET data types.
In SQL scripts, you can specify event parameters by name or with a question mark, but you cannot mix names and question marks within a script. If you use question marks, the parameters must be in the order shown below and are optional only if no subsequent parameters are specified (for example, you must use parameter 1 if you want to use parameter 2). If you use named parameters, you can specify any subset of the parameters in any order.
Parameter name for SQL scripts |
Description |
Order |
---|---|---|
s.remote_id | VARCHAR(128). The MobiLink remote ID. You can only reference the remote ID if you are using named parameters. | Not applicable |
s.username |
VARCHAR(128). The MobiLink user name. |
2 |
s.last_publication_download |
TIMESTAMP. The last download time of any synchronized table. |
3 |
s.publication name | VARCHAR(128). The name of the publication. | 4 |
s.subscription_id | VARCHAR(128). The publication ID. | 5 |
This event lets you record the time when the download of this publication was successfully applied at the remote database.
This event is only called when using non-blocking download acknowledgement. When in non-blocking mode, the download transaction is committed and the synchronization ends when the download is sent. When the synchronization client acknowledges a successful download, this event is called once per publication in the download. This event is called on a new connection and after the end_synchronization script of the original synchronization. The actions of this event are committed along with an update to the download time in the MobiLink system tables.
Due to the special nature of this script, any connection-level variables set during the synchronization are not available when this event is executed.
The following script adds a record to a table called download_pubs_acked. The record contains the publication name, the first authentication parameter, and a download timestamp.
INSERT INTO download_pubs_acked( pub_name, auth_parm, last_download ) VALUES( {ml s.publication_name}, {ml a.1}, {ml s.last_publication_download} ) |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |