Errors file and some more
Ivan Smahin
ivan_smahin at paradigmasoft.com
Thu Sep 11 13:56:33 CDT 2008
Hello Bart,
Thursday, September 11, 2008, 9:36:31 PM, you wrote:
> Hi Ruslan, list,
> 1) I'm looking for the errors xml file. I know it exists, I don't know
> how it is called and I don't know where it is stored.
> 2) In the process of trying to write clean code I found this on the wiki
> CREATE TABLE t1 ( f1 LONG UNIQUE );
> BEGIN
> INSERT INTO t1 VALUES(1);
> INSERT INTO t1 VALUES(1);
> EXCEPTION
> WHEN ERR_CONSTRAINT_UNIQUE_VIOLATION THEN
> PRINT 'Unique violation'
> END;
I think it was just an idea...
create or replace procedure sp1()
BEGIN
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(1);
EXCEPTION
WHEN ERR_CONSTRAINT_UNIQUE_VIOLATION THEN
PRINT 'Unique violation';
END;
> This ERR_CONSTRAINT_UNIQUE_VIOLATION seems to do exactly what I need
> (check for duplicate exception).
Yes
> I suppose I will find those constant names also in the errors xml file ?
Sure.
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
More information about the Valentina
mailing list