Contents Index Reporting errors Testing script syntax

MobiLink Synchronization User's Guide
  Writing Synchronization Scripts
    Writing scripts to handle errors

Handling multiple errors on a single SQL statement


ODBC allows multiple errors per SQL statement, and some DBMSs make use of this feature. Microsoft SQL Server, for example, can have two errors for a single statement. The first is the actual error, and the second is usually an informational message telling you why the current statement has been terminated.

When a single SQL statement causes multiple errors, the handle_error script is invoked once per error. The MobiLink synchronization server uses the most severe action code (that is, the numerically greatest) to determine the action to take. The same applies to the handle_error script.

If the handle_error script itself causes a SQL error, then the default action code (3000) is assumed.


Contents Index Reporting errors Testing script syntax