EInvalidOperation exception in procedure TZAbstractDataset

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
doug4
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: 02.04.2006, 05:43

EInvalidOperation exception in procedure TZAbstractDataset

Post by doug4 »

Under certain conditions I am getting an EInvalidOperation exception “Cannot focus a disabled or invisible window.” in procedure “TZAbstractDataset.InternalPost”. The exception occurs when the “inherited;” statement is called. It only happens when inserting a record using the JEDI “TJvDBGrid” component. It may be related to the “EditControls” property of TJvDBGrid. I have not been able to cause the error when doing updates, but only when inserting a record when using the EditControls property of TJvDBGrid.

I am getting around this problem by wrapping the “inherited;” statement as follows, but there must be a better way to handle or fix this problem:

try
inherited;
except
end;

The insert is successful if I use "try" to wrap the "inherited" as above.

Is there a problem or bug in procedure “TZAbstractDataset.InternalPost”? What it is the proper way to handle it?

Thanks,
doug4
Post Reply