Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Check constraint violated
Me wrote:
> On Sat, 14 Jun 2003 16:08:46 GMT, Ed Prochak wrote: > >
> > > I am validating this from VB but I wanted to know if I could do this form SQL as > well. > > Thanks.
Well, I didn't say you could not do it in the Database, I just said you cannot do it in a constraint. Have you considered adding triggers (PL/SQL) to check rules like this? If at all possible I suggest you make them table driven, but you may be happy with just a simple BEFORE INSERT trigger.
But it you already validated this, why add it to the DB? Likely you intend to remove the VB validation, but then you will have to add code to handle bad inserts (which return errors when the rule is violated).
HTH,
-- Ed Prochak running http://www.faqs.org/faqs/running-faq/ netiquette http://www.psg.com/emily.html -- "Two roads diverged in a wood and I I took the one less travelled by and that has made all the difference." robert frostReceived on Sun Jun 15 2003 - 20:34:15 CDT
![]() |
![]() |