I have one caution concerning triggers. Triggers slow things down. This is nothing to 
do with
R:Base; triggers have to be used sparingly in SQL Server because of the performance 
hit. Insert
and Delete triggers are not as intrusive as an UPDATE trigger, which can fire each and 
every time
a user closes a row of data, depending on what the trigger checks for. If you think of 
this
procedure firing every time a user moves down a row in a DBGrid or scrolling region, 
you will have
a better idea of the hit that might result. 

My Cdn $0.01 worth. And it's worth more every day!
 
--- Emmitt Dove <[EMAIL PROTECTED]> wrote:

> 
> Sharon,
> 
> Here is an example that drops the trigger, loads the procedure and creates 
> an after insert trigger:
> 
>    ALTER TABLE rfxrhr DROP TRIGGER INSERT
>    DROP PROCEDURE rfxrhr
>    PUT rfxrhr.prc AS rfxrhr RETURN INTEGER +
>        comment 'RF Release Roll from Hold Insert Trigger'
>    ALTER TABLE rfxrhr ADD triggers INSERT after rfxrhr
> 
> >Hi All,
> >
> >Great conference with lots of gems!
> >Unrelated to any of those topics, I am working on something most of you 
> >learned long ago.
> >
> >I am trying to use Stored Procedures and Triggers for the first time.  I 
> >successfully created the Stored Procedure and can run it using the CALL 
> >command.
> >
> >Now, what I want to do is to Trigger the Procedure as an AFTER INSERT.
> >If I understand the documentation correctly, a Trigger runs the Procedure 
> >BEFORE the row is inserted, updated or deleted.
> >But, I thought I remembered hearing about AFTER INSERT Triggers at an RBTI 
> >Conference in the past.
> >
> >Also, how do I put the Trigger in place?
> >
> >What I am trying to do is to enter data for a new row into a form and then 
> >as the form is refreshed using an ADD Row button, I want to print a report 
> >based on the previously entered row.
> >Alternately, I would like to have a button on the form that would print 
> >data from the screen right to a report.
> >I don't know how to do this since the data has not been added to table yet.
> >
> >Thanks for any help.
> >Sharon Lima
> 
> Emmitt Dove
> Manager, DairyPak Business Systems
> Blue Ridge Paper Products, Inc.
> 40 Lindeman Drive
> Trumbull, CT  06611
> (203) 673-2231
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> 


=====
Albert Berry 
Management Consultant
RR2 - 1252 Ponderosa Drive
Sparwood BC, V0B 2G2 
Canada
(250) 425-5806
(250) 425-7259
(708) 575-3952 (fax)
[EMAIL PROTECTED]

Reply via email to