Use this stored procedure to add custom actions immediately before the transmission of the upload.
Name |
Value |
Description |
---|---|---|
Publication_n (in) |
publication |
The publications being synchronized, where n is an integer. There is one publication_n entry for each publication being uploaded. The numbering of n starts at zero. |
MobiLink user (in) |
MobiLink user name |
The MobiLink user for which you are synchronizing. |
Script version (in) |
script version name |
The MobiLink script version to be used for the synchronization. |
If a procedure of this name exists, it is called immediately before dbmlsync sends the upload.
Actions of this procedure are committed immediately after execution.
Assume you use the following table to log synchronization events on the remote database.
CREATE TABLE SyncLog ( "event_id" INTEGER NOT NULL DEFAULT AUTOINCREMENT , "event_name" VARCHAR(128) NOT NULL , "ml_user" VARCHAR(128) NULL , "event_time" TIMESTAMP NULL, "table_name" VARCHAR(128) NULL , "upsert_count" VARCHAR(128) NULL , "delete_count" VARCHAR(128) NULL , "exit_code" INTEGER NULL , "status_retval" VARCHAR(128) NULL , "pubs" VARCHAR(128) NULL , "sync_descr " VARCHAR(128) NULL , PRIMARY KEY ("event_id"), ); |
The following example logs the MobiLink user and current timestamp immediately before the transmission of the upload.
CREATE PROCEDURE sp_hook_dbmlsync_upload_begin () BEGIN INSERT INTO SyncLog (event_name, ml_user,event_time) SELECT 'upload_begin', #hook_dict.value, CURRENT TIMESTAMP FROM #hook_dict WHERE name = 'MobiLink user'; END; |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |