Canceling changes onscroll

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Milan Bacik
Posts: 28
Joined: Fri 28 Apr 2006 08:59
Location: Czech Republic
Contact:

Canceling changes onscroll

Post by Milan Bacik » Tue 05 Feb 2013 10:55

I am trying something what was discused earlier here http://forums.devart.com/viewtopic.php? ... 33&p=87134 The problem is when user dont want to save changes than I want to all changes to current record was discarded and cursor is scrolled. I am trying to call Cancel() but than Post method generate INSERT and SQL throws error on unique index.
Underlaying component is TOraQuery and select is from 2 tables. User can save record by calling separate method with Save button.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Canceling changes onscroll

Post by AlexP » Tue 05 Feb 2013 15:06

Hello,

If you want to cancel insertion, you should use the Abort method instead of Cancel, as it is shown in the last post of the specified topic.

Milan Bacik
Posts: 28
Joined: Fri 28 Apr 2006 08:59
Location: Czech Republic
Contact:

Re: Canceling changes onscroll

Post by Milan Bacik » Tue 05 Feb 2013 17:40

No its update. Dataset is in dsEdit state. I dont know why TOraQuery generate INSERT after I call Cancel inside BeforePost.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Canceling changes onscroll

Post by AlexP » Wed 06 Feb 2013 13:51

Hello,

Please send a small sample demonstrating the problem to alexp*devart*com

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Canceling changes onscroll

Post by AlexP » Fri 08 Feb 2013 13:31

Hello,

Thank you for the information, we have reproduced the problem and will try to fix it in the nearest version.

Post Reply