How can database errors from the server (for example data conversion error in a stored procedure invoked by a configured operation) be captured or used to generate adapter error events when using the Sybase DB adapter? When an error occurs, the integration component seems to ignore it and go on to commit the transaction even though Sybase has aborted it. How can the error be captured and used to generate an adapter error notify event or otherwise be logged? Open Client provides for a callback routine to do this but I don’t know how to set this up with Sybase adapter.
Is the component that has built for this process inside a try/catch block. If so try doing that and throw AdapterException to catch the error and explicitly throw the Adapter::errorNotify.
Thanks for the suggestion. The operation is inside a try/catch block (an adapter error:Notify message is published if an exception is caught) but no AdapterException is being thrown when a Sybase error occurs. Is there any way to detect the error code or error message text from the Sybase server so that a message could be published? Does the Sybase adapter have a callback routine set up to receive errors from the server? If so what does it do with them?
Can you tell what are the types of error codes that requires an explicit error Notify to be thrown.
An example is:
Server Message: Number 265, Severity 16
Insufficient result space for explicit conversion of INT value ‘12345’ to a CHAR field.
(return status = -6)
This aborts the transaction (a stored procedure) but does not generate an adapter exception. This is just an example, I think that a lot of other types of server errors also would not generate exceptions.