Prepared Statements and Transactions

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
NineBerry
Posts: 11
Joined: Tue 02 Sep 2008 14:54

Prepared Statements and Transactions

Post by NineBerry » Tue 09 Sep 2008 21:50

Hi

I have noticed, that when a transaction is committed, all querys or sql-statements that had been prepared within that transaction, are not prepared any longer.

Is this a restriction by the Firebird server or is there any way to circumvent that behavior and keep statements prepared for use in multiple transaction (sequentially)?

Thanks in advance.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 10 Sep 2008 07:01

This is the restriction of InterBase/Firebird. Any statement is linked to a transaction and can be used only inside this transaction.

To keep statements prepared you can use CommitRetaining instead of Commit, or use several transactions.

NineBerry
Posts: 11
Joined: Tue 02 Sep 2008 14:54

Post by NineBerry » Wed 10 Sep 2008 10:34

Thank you for the information

Post Reply