Page 1 of 1

Dataset not in edit or insert mode error

Posted: Wed 11 Dec 2013 01:50
by inageib
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 ?

Re: Dataset not in edit or insert mode error

Posted: Wed 11 Dec 2013 09:21
by AlexP
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.

Re: Dataset not in edit or insert mode error

Posted: Wed 11 Dec 2013 12:50
by inageib
sorry, the compiler stops at the insert line but it was code in afterinsert event who caused the error.

problem solved.

Re: Dataset not in edit or insert mode error

Posted: Wed 11 Dec 2013 13:12
by AlexP
Hello,

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