ODBC_SetErrorHandler

4D - Documentation   Français   English   German   4D ODBC PRO, Command Theme List   4D ODBC PRO, Command Alphabetical List   Back   Previous   Next

version 2004


ODBC_SetErrorHandler (errorMethod)

ParameterTypeDescription
errorMethodStringError method to be invoked, or
Empty string to stop trapping errors

Description

The ODBC_SetErrorHandler command installs an error method that will handle the errors and 4D ODBC PRO will no longer display the alert informing you of invalid connection and/or statement IDs.

The called method will receive 2 parameters in $1 and $2:

$1 gets the error number,

$2 gets the error text.

Note: Due to database compilation, $1 and $2 must be declared repectively as longint (C_LONGINT) and text (C_TEXT) in the error method.

The method installed by this command can use the ODBC_SQLGetDiagRec routine to get more information on the error.

To uninstall the error handling method, pass an empty string to ODBC_SetErrorHandler.

See Also

ODBC_SQLGetDiagField, ODBC_SQLGetDiagRec.


4D - Documentation   Français   English   German   4D ODBC PRO, Command Theme List   4D ODBC PRO, Command Alphabetical List   Back   Previous   Next