sp_hook_dbmlsync_download_com_error (deprecated)

Use this stored procedure to add custom actions when communications errors occur while reading the download sent by the MobiLink server.

This hook is deprecated. See Handling errors and warnings in event hook procedures.

Rows in #hook_dict table

Name

Value

Description

table name (in)

table name

The table to which operations were being applied when the error occurred. The value is an empty string if dbmlsync is unable to identify the table.

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.

Remarks

If a procedure of this name exists, it is invoked when a communication error is detected during the download phase of synchronization. The download is then terminated.

This procedure executes on a separate connection, so that failures can be logged. Otherwise, the action of logging would be rolled back along with the synchronization actions. If dbmlsync cannot establish a separate connection, the procedure is not called.

By default on Windows Mobile devices, synchronization tables are locked in exclusive mode, which means that this hook cannot successfully execute if it requires access to any of the synchronization tables. It also cannot execute if it needs to access synchronization tables and you set the dbmlsync extended option LockTables to EXCLUSIVE. See LockTables (lt) extended option.

Actions of this procedure are committed immediately after execution.

See also
Examples

Assume you use the following table to log communication errors.

CREATE TABLE SyncLogComErrorTable
(
   " user_name "  VARCHAR(255) NOT NULL ,
   " event_time "   TIMESTAMP NOT NULL ,
);

The following example logs the MobiLink user and current time stamp when communications errors occur while reading the download sent by the MobiLink server. The information is stored on the SyncLogComErrorTable table on the remote database.

CREATE PROCEDURE sp_hook_dbmlsync_download_com_error ()
BEGIN
 INSERT INTO SyncLogComErrorTable (user_name, event_time)
  SELECT #hook_dict.value, CURRENT TIMESTAMP
  FROM #hook_dict
  WHERE name = 'MobiLink user';
END;