Page 1 of 1

Dataset not in Edit or insert mode

Posted: Tue 01 Jan 2013 09:40
by kwak
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!

Re: Dataset not in Edit or insert mode

Posted: Wed 02 Jan 2013 09:15
by AlexP
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.

Re: Dataset not in Edit or insert mode

Posted: Mon 07 Jan 2013 07:24
by kwak
OK workaround works!

Thx a lot!

Re: Dataset not in Edit or insert mode

Posted: Tue 12 Feb 2013 12:52
by AlexP
Hello,

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