[other] Re: [fpc-devel] IBConnection and transactions
Treeve Jelbert
treeve at scarlet.be
Sun Apr 30 19:59:01 CEST 2006
On Sunday 30 April 2006 20:09, Michael Van Canneyt wrote:
> On Sun, 30 Apr 2006, Joost van der Sluis wrote:
> > I have a problem that I do not understand.
> >
> > the following doesn't work with firebird:
> >
> > Fconnection.ExecuteDirect('create table FPDEV (id INT)');
> > Fconnection.ExecuteDirect('insert into FPDEV(id) values (1)');
> >
> > But the following does:
> >
> > Fconnection.ExecuteDirect('create table FPDEV (id INT)');
> > FConnection.Transaction.commitretaining;
> > Fconnection.ExecuteDirect('insert into FPDEV(id) values (1)');
> >
> > But both statements are executed within the same transaction?
>
> No they are not. CommitRetaining is like
> Commit;
> Starttransaction;
> only keeps the resources of the current transaction.
>
> In all the years I worked with interbase/firebird,
> I've learned to explicitly commit after each DDL statement.
it is not allowed to mix DDL and DML statements in the same transaction when
using firebird
>
> Michael.
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
--
Regards, Treeve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20060430/59873412/attachment.sig>
More information about the fpc-devel
mailing list