Tuesday, 20 August 2013

How to access Oracle Database Trigger code from C# code

How to access Oracle Database Trigger code from C# code

How can I access a Oracle database Trigger from within C# Code?
I want to create a program that checks tables, and compares them to that
table's trigger in Oracle. I want to then see if every column in the table
has a corresponding 'section' in the trigger code. I need read/write
access to the trigger via C# code.
Is this possible? How can i access DB triggers from C# code?
Example: TableA have 2 columns, Type and Value. Trigger_TableA only has
the following code:
....
IF (:OLD.TYPE IS NULL AND :NEW.TYPE IS NOT NULL) OR
(:OLD.TYPE<> :NEW.TYPE) THEN
vWhat_Changed := vWhat_Changed || ',TYPE='||:OLD.TYPE;
END IF;
.....
Trigger_TableA is incomplete, as it only is monitoring Type, and not
Value. The Trigger needs to be edited from its original state to include
code to monitor the Value column //end example

No comments:

Post a Comment