Richard Kaye wrote:
> Here's a little weekend VFP question for everyone. I have an 
> intermittent and very difficult to track problem with records being 
> deleted from a particular form in my app. I know the deletion is not 
> happening by the user clicking the delete button in the form in question 
> because a column value gets updated with a sys(2015) as part of a normal 
> delete and these deleted records retain their original value. So 
> somewhere, somehow I have a rogue delete that is firing on the wrong 
> work area. 


An excellent time to remind developers to use the IN clause instead of 
making any assumptions on the currently selected work area.


> Unfortunately, I haven't been able to reproduce this error in 
> my test environments so I thought that I could add a delete trigger that 
> would fire off and do 2 things:  one would be to capture the current 
> system state at that point in time including call stack, program/method, 
> etc and log it for me and two would be to return false on the trigger 
> and automatically recall/revert the deletion. I've done some very simple 
> interactive testing and the idea seems to work except that I don't want 
> the user getting a VFP dialog asking if they want to revert. I just want 
> it to happen and then shoot me an email with the bad news. Googling the 
> topic didn't bring back a great deal of useful examples but hey, that's 
> why we have Profox...


I think your idea is fine, but since it's happening now and you're 
unaware of it, perhaps just the email to you with that good info you're 
capturing will set the wheels in motion to fix it.  You will have a 
couple more episodes of rogue deletes perhaps, but at least you'll be 
made aware instantly via email and can get to the heart of the matter 
faster.

Good luck!
--Michael


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to