Re: How to use the Des2K API to create triggers

From: Tim Hall <tim.hall_at_spam.begone>
Date: 1997/10/22
Message-ID: <344db9ec.813655_at_69.0.9.9>#1/1


On 21 Oct 97 21:33:07 GMT, "Olivier Mungo" <olivier.mungo_at_free-way.net> wrote:

>I would like to use the Desginer/2000 API to automatically create triggers.
> Like looking for the "uppercase" properties, and if the properties of the
>columns is set to 'Y', create a POST-INSERT or POST-UPDATE triggers to
>automatically converts the content of the column in uppercase.
>
>I have search the all Designer/2000 documentation, I even call Oracle
>support but they was unable to tell me in which table of the CASE
>repositery I have to insert data.
>
>An example or any help would be very gratefull.
>

You want the column UPPERCASE on the view CI_COLUMNS to determine whether to create the trigger, but you probably know that already.

To create a trigger you will need to create rows in CI_DATABASE_TRIGGERS, CI_MODULES and CDI_TEXT (for the actual PL/SQL code). While you can insert into the first two using the API, there is unfortunately no API interface procedure for CDI_TEXT, which contains the actual trigger code. You're not allowed to simply insert rows in the table.

You could write a report which generates DDL, and then reverse-engineer the created triggers.



Tim Hall, Indus International (was TSW International)

http://www.tswi.com
http://www.indusgroup.com

Replace domain name with the domain from the first URL before replying via email! Received on Wed Oct 22 1997 - 00:00:00 CEST

Original text of this message