Handles errors that the UltraLite runtime signals to your application.
For a description of error handling using this technique, see ULRegisterErrorCallback function.
ul_error_action UL_GENNED_FN_MOD error-callback-function ( SQLCA * sqlca, ul_void * user_data, ul_char * buffer );
error-callback-function The name of your function. You must supply the name to ULRegisterErrorCallback.
sqlca A pointer to the SQL communications area (SQLCA).
The SQLCA contains the SQL code in sqlca->sqlcode
. Any error parameters have already been retrieved from the SQLCA and stored in buffer.
This sqlca pointer does not necessarily point to the SQLCA in your application, and cannot be used to call back to UltraLite. It is used only to communicate the SQL code to the callback.
In the C++ component, use the Sqlca.GetCA method.
user_data The user data supplied to ULRegisterErrorCallback. UltraLite does not change this data in any way. Because the callback function may be signaled anywhere in your application, the user_data argument is an alternative to creating a global variable.
buffer The buffer supplied when the callback function was registered. UltraLite fills the buffer with a string, which holds any substitution parameters for the error message. To keep UltraLite as small as possible, UltraLite does not supply error messages themselves. The substitution parameters depend on the specific error. For more information about error parameters for SQL errors, see SQL Anywhere error messages.
Returns one of the following actions:
UL_ERROR_ACTION_CANCEL Cancel the operation that raised the error.
UL_ERROR_ACTION_CONTINUE Continue execution, ignoring the operation that raised the error.
UL_ERROR_ACTION_DEFAULT Behave as if there is no error callback.
UL_ERROR_ACTION_TRY_AGAIN Retry the operation that raised the error.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |