Welcome! Log In Create A New Profile

Advanced

HFSQL client server trigger

Posted by cabinetman 
HFSQL client server trigger
October 07, 2018 05:52PM
Hello All,

I have a date field on a file that when just that date changes I need to run a procedure.
I was looking to do it with a Application trigger.

I see how to set up the trigger but my question is how would I know if the date field has been changed.

I tried to set the value to an array in a before trigger and then compare it in a after trigger but it has the new value in both.

Am I barking up the wrong tree?

DW
Re: HFSQL client server trigger
October 07, 2018 09:03PM
Workaround hack here. Put a DateB4 in the data file. When your program makes a change to your date field, put the old value in DateB4. When your data gets to the trigger, check DateB4. If there is a value, do you thing, then reset the DateB4 field to blank.

JAT, Art



Edited 1 time(s). Last edit at 10/08/2018 02:52AM by ArtBonds.
Re: HFSQL client server trigger
October 08, 2018 04:39PM
Hi

about art's workaround

if you need to do all that in order to make your trigger work, then don't use a trigger and do what you need directly in the modifying code.

Personally, I have, a long time ago, written hadd/hmodify/hdelete global procedures overwritting the regular ones where I do all the 'automatic stuff + the normal hadd/hmodify/hdelete...

I use this for the replication system, of course, but it can be used for anything.

Best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: