Dataset not in Edit or insert mode

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kwak
Posts: 7
Joined: Tue 01 Jan 2013 09:25

Dataset not in Edit or insert mode

Post by kwak » Tue 01 Jan 2013 09:40

Hi,

In my Firemonkey-app I use a TMyQuery which is connected to a TStringgrid.
When the last record is selected I can successful insert a new record through a Query.insert command.
However when I select another record in my grid and get the following error by inserting a record:
"Dataset not in Edit or Insert mode"

There are no problems by updating or deleting.

Anybody any thoughts about this. Do you guys advise me for using a clientdataset?

Best regards!

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

Re: Dataset not in Edit or insert mode

Post by AlexP » Wed 02 Jan 2013 09:15

Hello,

Thanks for the information, we have reproduced the issue and we'll try to fix this behavior in the nearest version.
Currently, to solve this problem you can use the MyQuery.DisableControls methods prior to calling the Insert method, and MyQuery.EnableControls after calling the Post method.

kwak
Posts: 7
Joined: Tue 01 Jan 2013 09:25

Re: Dataset not in Edit or insert mode

Post by kwak » Mon 07 Jan 2013 07:24

OK workaround works!

Thx a lot!

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

Re: Dataset not in Edit or insert mode

Post by AlexP » Tue 12 Feb 2013 12:52

Hello,

We have fixed the problem. Now, you can insert records into Grid not using the DisableControls and EnableControls methods.

Post Reply