Subject Re: [IBO] "Statement has not been prepared"
Author tickerboo2002
Thanks for that Helen

I added 'if qry->NeedToPost' and it stopped the 'Cannot Post Row'
messages :-) however, I still get the "Statement has not been
prepared" message.

When I execute:

if qry->NeedToPost
> {
> qry->Post();
> qry->IB_Transaction->Commit();
> }
> qry->Close();
> qry->Unprepare();

in FormCloseQuery, everything is hunky-dory. It seems as though
the exception is coming when the Transaction or (TIBO_)Query is
deleted.

The transaction has:
AutoCommit=false
ServerAutoCommit=false
Isolation=concurrency;

The Query has all parameters as the defaults.

It seems to be doing something when the form actually closes, but
I've no idea what. I'll fire up IB_Monitor and take a look.


> If this is a form that you create for the purpose of editing a
single
> record, then why not provide a selector for the task id BEFORE the
form is
> created and pass the selected id to a TIB_Cursor that returns just
that
> record from a parameterised statement?

The form holds multiple records - it's similar to the MS Outlook Task
window.

TIA

David