Subject Dataset state lost just before posting
Author dr_bentonquest
Hi there,

I am getting a 'Dataset not in edit or insert mode' message
(EDatabaseError) when trying to post changes to a TIBOQuery, even
where I am sure the state of my TIBOQuery is dsInsert. The TIBOQuery
is called quDetallecot in the following code snippet:

if fmCotiza.quDetallecot.State in [dsEdit,dsInsert] then
begin
showmessage('Dataset *is* in dsEdit,dsInsert');
fmCotiza.quDetallecot.Post;
Close;
end;

The Showmessage does fire indicating that state is OK, but I get the
error message at the Post line. State is lost somewhere between the
Showmessage and the actual post (!). The TIBOQuery does have only one
event (OnNewRecord) where one TField is initialized, there's nothing
else in the events list.

Any hints?

Thanks in advance,

-Benton