|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| Find out before values on hModify |
| Iniciado por dsprosystems, 30,ago. 2016 11:42 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 30,agosto 2016 - 11:42 |
Hi
I am using session level database table triggers.
Is there a method of getting the 'before' field values of a table update within the session trigger without implementing logging?
e.g. customer.name was changed from 'hello' to 'goodbye' - in the session triggers (before modify) customer.name shows as 'goodbye' - is there syntax to get the actual before value 'hello' ?
Many thanks Dave |
| |
| |
| | | |
|
| | |
| |
| Publicado el 30,agosto 2016 - 14:29 |
Hi Dave
you can always : - create an alias on the file (halias) - read the record - get the previous valeu from the record
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source)
More information on http://www.fabriceharari.com
Le 8/30/2016 à 3:42 AM, Dave Summers a écrit :
Hi
I am using session level database table triggers. Is there a method of getting the 'before' field values of a table update within the session trigger without implementing logging?
e.g. customer.name was changed from 'hello' to 'goodbye' - in the session triggers (before modify) customer.name shows as 'goodbye' - is there syntax to get the actual before value 'hello' ?
Many thanks Dave |
| |
| |
| | | |
|
| | |
| |
| Publicado el 30,agosto 2016 - 15:12 |
Hi Fabrice
Thanks for your reply
I was hoping for some method i could do dynamically (with myfile/indirection) within the trigger as it will potentially be for all tables and from any process in a large project
If not then i am going to have to consider the overhead of enabling logging
cheers again
Dave |
| |
| |
| | | |
|
| | |
| |
| Publicado el 30,agosto 2016 - 20:05 |
Hi Dave,
of course you can code dynamically... In fact, even simpler, you can use my code from WXReplication where I do exactly that.
I have a method creating he haliases on the fly when required to replicate only the fields modified.
That should be nearly exactly what you need (except that it's not in a trigger)
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source)
More information on http://www.fabriceharari.com
Le 8/30/2016 à 7:12 AM, Dave Summers a écrit :
Hi Fabrice
Thanks for your reply
I was hoping for some method i could do dynamically (with myfile/indirection) within the trigger as it will potentially be for all tables and from any process in a large project
If not then i am going to have to consider the overhead of enabling logging cheers again
Dave |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|