Subject | Re: [IBO] "Statement has not been prepared" |
---|---|
Author | Tickerboo Support |
Post date | 2002-09-23T15:13:50Z |
> Hmmm. Somehow I think this is the first time you mentioned you were usingIt is, sorry, I didn't think it made any difference since I wasn't
> custom DML. It might be revealing to see what the custom DML is for the
> offending operation...
inserting, updating or deleting anything.
> > Started: truetrue.
>
> means the transaction has been started but nothing (even a prepare) has
> happened inside it yet. When a Prepare happens, InTransaction becomes
Ooh! That's odd. In my FormShow event I have:
ShowTransactionState(tn);
qry->Prepare();
ShowTransactionState(tn);
qry->ParamByName("USER_ID")->AsInteger = dmMain->GetUserID();
qry->Open();
When I run this, InTransaction is still false even after preparing the qry.
Which is odd.
> Or a timing issue: likely that, by the time FormCloseQuery fires, IBO hasI hope not, all my IBO post/commit code is in FormCloseQuery events!
> already done the housekeeping on any lingering statements.
> I'm confused as to why you are calling Locate() at all during an Edit. Afor
> dataset's Insert, Update and Delete methods always operate on the current
> record in the buffer - the one the cursor is on. Are you saying that you
> let the user scroll around the dataset whilst editing an unbound control
> pertaining to a particular record? If so, I guess you have some reason
> this...I'd always want to keep unbound edits securely pinned to the recordI'm using a third-party non-data aware component.
> they belong to.
If the user doesn't change anything and closes the form, there's no error.
If I do a locate and the user still doesn't change the data, then there's an
error when the form closes. There's something about 'Locate' Does it place
the row into an Edit state?
> OTOH, if it's a ground floor window, the fresh air might help...Thanks for your help, I greatly appreciate it.
David
PS I'm doing something daft I just know