Page 1 of 1

Not in insert or edit mode error

Posted: 17.04.2013, 22:24
by IbeDBob
Hi all,

D5 and SQLite...

I have a weird thing going on. I have an application that is working fine until I post some data to another database.

It all works as expected and returns to the main screen without error -- but as soon as I click any button on the main form, including "Close" I get the Error in the above Subject.

It crashes out in
procedure TZAbstractRODataset.SetFieldData(

I did some online searching for suggestions and tried them all including checking for an OnChange event that tries to assign to the left-side when not in edit mode, but I have none.

The weird thing is that it happens as soon as I click any button. The "Close" for instance only has "Close;" assigned yet even it crashes. And it crashes before getting to the "Close;" statement.

Currently I am getting around it with this line inserted in the above procedure...

begin
if not(State in [dsEdit, dsInsert]) then Exit;

I do not like brute force fixes so would like to find out why this error is happening.

Oh, and the Call Stack window only shows the app name and the above procedure before the error.

Thanks