Subject Re: [firebird-support] SQL : -625 / CHECK /
Author Nando Dessena
Safak,

S> I have added CHECK Constraint to one of my fields.
CHECK(VALUE>>=0 AND VALUE<=100)

S> If user try to enter any value out range then Firebird send SQL Error
S> code as -625. I hande it and I show a message to user.

S> But I have no idea abouth the main source of -625. (Which field, what
S> is the range defined in CHECK, ...)

S> Is it possible to return my own defined error string instead of -625
S> at database level. (Like expections in stored procedures)

No, you should use before insert / before update triggers if you need
to do that. Also, look at the message text: it should contain the
constraint name, from which you could gather information about the
constraint. To do this effectively, you need to explicitly name
constraints. INTEG_254 does not really help.

Ciao
--
Nando mailto:nandod@...