report_odbc_error connection event

In the following table, the description provides the SQL data type. If you are writing your script in Java or .NET, use the
appropriate corresponding data type. See SQL-Java data types and SQL-.NET data types.

In SQL scripts, you can specify event parameters by name or with a question mark. Using question marks has been deprecated
and it is recommended that you use named parameters. You cannot mix names and question marks within a script. If you use question
marks, the parameters must be in the order shown below and are optional only if no subsequent parameters are specified (for
example, you must use parameter 1 if you are going to use parameter 2). If you use named parameters, you can specify any subset
of the parameters in any order.

Parameter name for SQL scripts

Description

Order (deprecated for SQL)

s.action_code

INTEGER. This is an INOUT parameter. This parameter is mandatory.

1

s.odbc_state

VARCHAR(5). The ODBC SQLSTATE.

2

s.error_message

TEXT. The ODBC error message.

3

s.remote_id

VARCHAR(128). The MobiLink remote ID. You can only reference the remote ID if you are using named parameters.

Not applicable

s.username

VARCHAR(128). The MobiLink user name.

4

s.table

VARCHAR(128). The table whose script caused the error.

5

s.script_version

VARCHAR(128). Optional IN parameter to specify that the MobiLink server passes the script version string used for the current
synchronization to this parameter. Question marks cannot be used to specify this parameter.

This script allows you to log errors and to record the actions selected by the handle_odbc_error script. This script is executed
after the handle_odbc_error event, whether or not a handle_odbc_error script is defined. It is always executed in its own
transaction, on a different database connection than the synchronization connection (the administrative/information connection).

The ODBC state and error message allow you to identify the nature of the error. The action code value is returned by the last
call to an error handling script for the SQL operation that caused the current error.

If the error happened as part of synchronization, the user name is supplied. Otherwise, this value is null.

If the error happened while manipulating a particular table, the table name is supplied. Otherwise, this value is null. The
table name is the name of a table in the remote database. This name may or may not have a direct counterpart in the consolidated
database, depending on how your remote table names map to consolidated database table names.