Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » MobiLink - Client Administration » Event Hooks for SQL Anywhere Clients » Introduction to dbmlsync hooks » Using event-hook procedures

Connections for event-hook procedures Next Page

Handling errors and warnings in event hook procedures


You can create event hook stored procedures to handle synchronization errors, MobiLink connection failures, and referential integrity violations. This section describes event hook procedures that are used to handle errors and warnings. Once implemented, each procedure is automatically executed whenever an error of the named type occurs.

Handling RI violations

Referential integrity violations occur when rows in the download violate foreign key relationships on the remote database. Use the following event hooks to log and handle referential integrity violations:

Handling MobiLink connection failures

The sp_hook_dbmlsync_ml_connect_failed event hook allows you to retry failed attempts to connect to the MobiLink server using a different communication type or address. If connection ultimately fails, dbmlsync calls the sp_hook_dbmlsync_communication_error and sp_hook_dbmlsync_all_error hooks.

See sp_hook_dbmlsync_ml_connect_failed.

Handling dbmlsync errors

Each time a dbmlsync error message is generated, the following hooks are called:

See:

If you want to restart a synchronization in response to an error, you can use the user state parameter in sp_hook_dbmlsync_end.

See sp_hook_dbmlsync_end.

Ignoring errors

By default, synchronization stops when an error is encountered in an event hook procedure. You can instruct the dbmlsync utility to ignore errors that occur in event hook procedures by supplying the -eh option.

See IgnoreHookErrors (eh) extended option.