× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I really have a hard time with edits in a before trigger, in a
maintenance
program, and in a constraint. What if the before trigger thinks the
maintenance program will handle it, and the maintenance program thinks
the
constraint will handle it?

I view it the other way. It's not that the DB (constraint) should handle
the edit, it's that it's a last-line-of-defense against any program that
doesn't handle the edit.

Inserting data into a table without checking the constraints much
earlier in the program stack is just silly. Sure, you can handle the
error, decode the constraint name, and somehow notify the user in a
friendly manner from 7 program calls deeper in the stack, or you can
just check for the error in the UI in the first place and give the user
a friendly message.

The point of a constraint is to tell the db how to protect itself from
_any_ unchecked updates. Say, DFU, DBU, ODBC, whatever.

-Walden

--
Walden H Leverich III
Tech Software
(516) 627-3800 x3051
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.