Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: OO and relation "impedance mismatch"

Re: OO and relation "impedance mismatch"

From: Kenneth Downs <firstinit.lastname_at_lastnameplusfam.net>
Date: Tue, 05 Oct 2004 08:45:00 -0400
Message-ID: <d05ujc.652.ln@mercury.downsfam.net>


Troels Arvin wrote:

> On Mon, 04 Oct 2004 18:40:56 -0400, Kenneth Downs wrote:
> 
>> But if you use a trigger, you can do tell-me-everything-I-did-wrong.
> 
> I don't quite understand this: How can the trigger overcome fail-on-first
> error handling?

The trigger records each error that it finds, but instead of stopping it keeps going. So the more you have, the more that are recorded. It actually never raises an error in the strict sense, you might say it always "returns true".

> 
>> The
>> best I have so far come up with is to return a table of error codes and
>> descriptions with each save attempt.
> 
> This is exactly the kind of error handling I'm looking for.
> 

Here is an example of my current experimental form. My own approach is to generate these triggers out of a data dictionary, as otherwise it becomes hopelessly unmanageable. But anyway, for SQL Server, an example would be:

CREATE TRIGGER acrmcustcall_INSERT
ON acrmcustcall
FOR INSERT AS
begin

--

--

-- 
Kenneth Downs
Use first initial plus last name at last name plus literal "fam.net" to
email me
Received on Tue Oct 05 2004 - 07:45:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US