Lazarus

Programming => Databases => Topic started by: Arn on November 23, 2022, 09:30:13 am

Title: DBNavigator Using BeforeAction
Post by: Arn on November 23, 2022, 09:30:13 am
Hello,

I want to handle nbInsert and nbDelete in a special way before standard action of DBNavigator fires. I use BeforeAction event to do so. In my Button = nbDelete  handler I process the deletion followed by Abort to tell DBNavigator not to process the delete click. No problem here.

How do I pass other  Nb-buttons in BeforeAction to be processed in normal way, eg when Button = nbPost.

My program fires Access Violation in case when Button = nbPost with my BeforePost handler in place.

Is there a Pass method or something like that, same level as Abort, that I can call when Button = nbPost to tell DBNavigator to process the Post normally and not fire Access Violation?

Any help would be most appreciated.

Sincerely,

Arn.

Title: Re: DBNavigator Using BeforeAction
Post by: Thaddy on November 23, 2022, 10:01:37 am
Without code we can not help you. Access violations are usually - well almost always - programmer error
Title: Re: DBNavigator Using BeforeAction
Post by: egsuh on December 01, 2022, 01:44:35 am
BeforePost etc. events are of TDataSet, not navigator.
TinyPortal © 2005-2018