On Mon, 27 Aug 2001 08:48:52 +1000 (EST), you wrote:
>It's been mentioned before, but a set of error numbers for database errors
>would make trapping exceptions and dealing with them gracefully a LOT
>simpler. I have java code that runs against Oracle, Informix, PostgreSQL,
>MS SQL Server and Cloudscape. All(?) the others have an error code as well
>as an error message and it's a lot easier to get the error code.

I agree. Its on the list on
http://lab.applinet.nl/postgresql-jdbc/#SQLException. This
requires new functionality in the backend.

>Of course, they all have *different* error codes for the same error (ie
>primary key violation). Nothing is ever simple.

Perhaps the SQLState string in SQLException can make this easier
(if we can support this with PostgreSQL). This is supposed to
contain a string identifying the exception, following the Open
Group SQLState conventions. I'm not sure how useful these are.

René Pijlman

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to