Posted: Fri Jul 25, 2014 10:24 am Post subject: Evaluating exceptionlist database failure reason
Apprentice
Joined: 05 Jan 2002 Posts: 39
I would like to differentiate between database insert errors in ESQL and identify if the insert failed due to a recoverable error or non-recoverable ie. something wrong with the data being inserted. Recoverable means insert to db may have failed due to logon failures, network error, table out of space etc. I would like to do this so I can set up process to be able to retry the messages which failed due to 'recoverable ' errors.
Looking at odbc sqlstate codes - there is quite a mix and I believe I would have to grab the sqlstate out of the last child and list the ones I thought were recoverable and the ones that are not.
There is also a line in the last DatabaseException which states ImbOdbcStatement for the data error (bad data on insert) and the other for the connection failure due to bad password has ImbOdbcConnection.
I would like to codify this in a simple manner - has anyone else solved this issue?
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
I tried this once. I gave up after some 'Fixes' to the DB changed all the error codes.
The DB supplier said 'tough, all the error codes we return are documented'.
That was true but suddenly the error codes for a error that we had a test case for changed. Time to pull hair out of head, go to the Pub and forget about doing for specific errors. Never felt like trying again. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum