Subject | Re: [IBO] "Transaction has already been started" |
---|---|
Author | Helen Borrie |
Post date | 2003-08-24T09:37:21Z |
At 04:39 PM 24/08/2003 -0500, you wrote:
compatibility component for the BDE's TUpdateSQL. In the BDE model, you
use one of these as the UpdateObject property of a non-updatable
dataset. You link parameters from the the non-updatable dataset (e.g. a
TIBODataset that is formed from a join, or a TClientDataset) to statements
that would be used for updating, inserting and deleting, respectively. It
isn't meant for performing "stand-alone" DML.
You don't need TIBOUpdateSQL **at all** for the DML for a TIBOQuery. It
has its own xxxxxSQL properties already integrated (see EditSQL, InsertSQL
and DeleteSQL; also LockSQL for customising pessimistic locking).
If you want to do stand-alone DML in IBO, use a TIB_DSQL or a
TIB_Cursor. It's fine to link these to a TIBODatabase, and TIBOTransaction
as well, if you don't want to use the default transaction of TIBODatabase.
It's also not a great idea to mix the TDataset-compatible components with
the native TIB_* components, until you know what you are doing. If you
want to add a transaction to TIBODatabase, use TIBOTransaction. (That
said, you would probably not be in too much trouble hooking a
TIB_Transaction to TIBODatabase, given that TIBODatabase is a
TIB_Connection descendant...)
Apart from that, it's not possible to tell, from the information so far,
what it is that you are trying to do here.
I'm having the greatest trouble trying to write this email. We have a
Force 9 gale here tonight, 120 Kph gusts, and the power keeps going
out. :-(( I saw on the news that it was worse down Geoff's way,
widespread power-outs and trees down on houses. Hope all's well with Geoff...
regards,
Helen
> >But there is more trouble here. This looks really weird:Oh-ummm. That is not what TIBOUpdateSQL is for. It is a
>
> >FSQLCommand.InsertSQL.Text := sSQL;
>
> > try
>
> > FSQLCommand.ExecSQL(ukInsert);
> > DBO_DataModule.IB_Transaction1.Commit;
>
> >What kind of object is FSQLCommand? What are you trying to do here?
>
>It is a TIBOUpdateSQL, and i'm trying to insert a record through it.
compatibility component for the BDE's TUpdateSQL. In the BDE model, you
use one of these as the UpdateObject property of a non-updatable
dataset. You link parameters from the the non-updatable dataset (e.g. a
TIBODataset that is formed from a join, or a TClientDataset) to statements
that would be used for updating, inserting and deleting, respectively. It
isn't meant for performing "stand-alone" DML.
You don't need TIBOUpdateSQL **at all** for the DML for a TIBOQuery. It
has its own xxxxxSQL properties already integrated (see EditSQL, InsertSQL
and DeleteSQL; also LockSQL for customising pessimistic locking).
If you want to do stand-alone DML in IBO, use a TIB_DSQL or a
TIB_Cursor. It's fine to link these to a TIBODatabase, and TIBOTransaction
as well, if you don't want to use the default transaction of TIBODatabase.
It's also not a great idea to mix the TDataset-compatible components with
the native TIB_* components, until you know what you are doing. If you
want to add a transaction to TIBODatabase, use TIBOTransaction. (That
said, you would probably not be in too much trouble hooking a
TIB_Transaction to TIBODatabase, given that TIBODatabase is a
TIB_Connection descendant...)
Apart from that, it's not possible to tell, from the information so far,
what it is that you are trying to do here.
I'm having the greatest trouble trying to write this email. We have a
Force 9 gale here tonight, 120 Kph gusts, and the power keeps going
out. :-(( I saw on the news that it was worse down Geoff's way,
widespread power-outs and trees down on houses. Hope all's well with Geoff...
regards,
Helen