Dataset not in edit or insert mode error

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Dataset not in edit or insert mode error

Post by inageib » Wed 11 Dec 2013 01:50

Hi,
I get this error message
Dataset not in edit or insert mode
When I try call the insert method of TIBCQuery component. Here is the code I use

Code: Select all

mytable.Insert; //<<<--- error here
  mytable.fieldbyname('fld1').asinteger := 22;
  mytable.post;
Why is that ?

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

Re: Dataset not in edit or insert mode error

Post by AlexP » Wed 11 Dec 2013 09:21

Hello,

This error can occur only on attempt to edit a field of DataSet, that is not in the edit or insert mode. Please provide the full code causing the error.

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Re: Dataset not in edit or insert mode error

Post by inageib » Wed 11 Dec 2013 12:50

sorry, the compiler stops at the insert line but it was code in afterinsert event who caused the error.

problem solved.

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

Re: Dataset not in edit or insert mode error

Post by AlexP » Wed 11 Dec 2013 13:12

Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.

Post Reply