Print Thread
OnDelete not called
#2665 10/25/01 07:22 PM
Joined: Oct 2001
Posts: 39
Oyten, Germany
S
Member
OP Offline
Member
S
Joined: Oct 2001
Posts: 39
Oyten, Germany
Marco,

is this a WAD?

TDataSet in CachedUpdate (Master of a Detail DataSet)
Insert a record (and do not post it). Insert a record on a detail DataSet. Delete the Master-Record.

The OnDelete handler will not be called ?

Greetings
Sven

Re: OnDelete not called
#2666 10/26/01 04:10 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
Before looking into this, which OnDelete handler are you referring to?

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: OnDelete not called
#2667 10/26/01 05:44 PM
Joined: Oct 2001
Posts: 39
Oyten, Germany
S
Member
OP Offline
Member
S
Joined: Oct 2001
Posts: 39
Oyten, Germany
You're right. The handler has the correct name:

TOracleDataSet.BeforeDelete(DataSet : TDataSet)

Greetings
Sven

Re: OnDelete not called
#2668 11/01/01 04:09 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
If the newly inserted record isn't posted yet, it will effectively be cancelled when you delete it. That's why the BeforeDelete event does not fire.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.027s Queries: 13 (0.005s) Memory: 2.5079 MB (Peak: 3.0437 MB) Data Comp: Off Server Time: 2024-05-20 03:20:20 UTC
Valid HTML 5 and Valid CSS