On 04-May-99 David Pellegrini wrote:
> mmatthew@stripped wrote:
>> On Mon, 3 May 1999, David Pellegrini wrote:
[error code detection question]
> Mark, you probably don't hear this often enough, but your efforts are greatly
> While the SQLState carries "industry-standard" values, the errorCode is "...
> specific to each vendor.
Do you mean the db vendor or the jdbc vendor? Anyway, we could all solve this
by making a faq with all the error's we retrieve. I'm sure it will be filled in
a few weeks.
> Normally this will be the actual error code returned
> by the underlying database." So I would expect
> the raw, unmapped MySQL error codes to appear here. With that and a list of
> MySQL error codes, I have a fine solution.
> I coded around this with ...
> if (ex.getMessage().indexOf("Duplicate") != -1)
> // process the duplicate key situation
> ... and moved on. Is there a better way to to do this?
I'm sure that all the developers have been debugging when making an
application (I do). I always print my errors to the console. When it is
compiled I run it from within a xterm to see what error's are produced.
Regards Hans Wolters
22 Linux Search Engines in one applet
Linux Links/CMI8330 Soundpro HOWTO