To implement scripted upload, you create stored procedures that define the upload by returning result sets that contain the rows to update, insert, or delete on the consolidated database.
When the stored procedures are called, a temporary table called #hook_dict is created that has two columns: name and value. The table is used to pass name-value pairs to your stored procedures. Your stored procedures can retrieve useful information from this table.
The following name-value pairs are defined:
Name | Value | Description |
---|---|---|
start progress |
timestamp as string | The time up to which all changes on the remote database have been uploaded. Your upload should only reflect operations that occur after this time. |
raw start progress |
64-bit unsigned integer | The start progress expressed as an unsigned integer. |
end progress |
timestamp as string | The end of the upload period. Your upload should only reflect operations that occur before this time. |
raw end progress | 64-bit unsigned integer | The end progress expressed as an unsigned integer. |
generating download exclusion list |
true|false | True if the synchronization is download-only or file-based. In those cases no upload is sent, and the download is not applied if it affects any row selected by a scripted upload stored procedure. (This ensures that changes made at the remote database that need to be uploaded are not overwritten by the download.) |
subscription_n | subscription name(s) | The names of subscriptions being synchronized where n is an integer. This is one subscription_n entry for each subscription being synchronized. The numbering of n starts at zero. |
publication_n |
publication name | Deprecated. Use subscription_n instead. The publications being synchronized, where n is an integer. The numbering of n starts at zero. |
script version | version name | The MobiLink script version to be used for the synchronization. |
MobiLink user | MobiLink user name | The MobiLink user for which you are synchronizing. |
Custom progress values in scripted upload
Stored procedures for inserts
Stored procedures for deletes
Stored procedures for updates
Publications for scripted upload
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |