Re: Database Triggers and Forms 4.5

From: Haakon T Soenderland <haakonts_no_spam_at_online.no>
Date: 1997/12/23
Message-ID: <MPG.f0a5c805095a616989694_at_news.sol.no>#1/1


In article <67olur$a9i_at_bgtnsc03.worldnet.att.net>, jstrano_at_dulcian.com says...
> On every table, we have history columns to keep track of CREATE_BY,
> CREATE_DT, MODIFY_BY and MODIFY_DT.
> We have created a trigger on every table that has these columns to
> automatically populate them. The problem is when
> Forms writes info to the database, it sees the changes the triggers makes
> as a change done by another user. That record is now
> in-accessable until I re-query that block. I can't just re-query the block
> the cursor is in, since I might have changes info in 5 different
> blocks. I don't want to re-query every block because there are 35 blocks
> in this application. Our solution was to create a
> form level PRE-INSERT and PRE-UPDATE trigger to take care of this info for
> us. But, we are looking for a better solution. Any ideas?

I'm working from memory here, so bear with me :)

If you don't include these fields in the block will you still get the error? (if you need to see the fields in the block, then this obviously won't work) Also it should be possible to update the fields after you have applied your changes by using a transactional trigger. You then need to queue up the cahnges in an array or somesuch (in a package probably) while firing the row level triggers and apply them in the transaction level trigger. I think that might work (no chance to test it right now).

Hope some of this helps,
Haakon

-- 
--
Core Technology AS
www.core.no
hts_no_at_spam_core.no
(remove _no spam_ to reply)
Received on Tue Dec 23 1997 - 00:00:00 CET

Original text of this message