Title: Message
 
Emmitt, I have the messages in there only to tell me what procedure is now running. If I do the mass update, I do not see my message that "LAST_MAINT Changed". If I edit a row individually, I do get that message..

Charles,

You should expect the trigger to run regardless of the source of the update.

Try taking out the message and see what happens.  Generally, it is not a good idea to have triggers that include screen or user interaction.  For example, what happens if the update comes from an ODBC source such as Oterro?


[Running RbWin 6.5++ on WinXP.]
 
I have an update trigger/procedure setup that checks for a change to a column called LAST_MAINT in table EXTINGUISHER.
If there is a change to the column, the procedure will perform an UPDATE to the column called NEXT_MAINT.  This was setup this way as opposed to a computed column because there are lookups involved regarding time extinguisher type and the maintenance periods based on that extinguisher type.
 
What is odd is that if I edit a row individually using EDIT * FROM x, or EDIT USING formname, and the column named in the procedure has changed, it will perform my update perfectly. I have a message pop-up in the post-update procedure that tells me the update is being performed in fact.
 
However, if I try a mass update at the R>:
 
 UPDATE table SET LAST_MAINT = value from column in table2 where column in table2 IS NOT NULL, the post-update procedure never runs, and thus the change is not made to the NEXT_MAINT column! Both columns are datatype DATE.
 
NOTE: I am only performing this mass update to force the procedure to calculate NEXT_MAINT for all applicable rows. I had already entered the LAST_MAINT dates before I wrote the trigger/stored procedure.
 
Is this behavior exhibited by the trigger/stored procedure normal for the mass update?

Thanks,
Charley
 

Emmitt Dove
Manager, DairyPak Business Systems
Blue Ridge Paper Products, Inc.
40 Lindeman Drive
Trumbull, CT  06611
(203) 673-2231
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to