[Lazarus] SQLTransaction won't start
Michael Van Canneyt
michael at freepascal.org
Sun Mar 16 12:36:56 CET 2014
On Sat, 15 Mar 2014, Petr Hlozek wrote:
> Unfortunately this problem is only when I try to run the app in
> Lazarus and put breakpoit somewhere. When I run it directly in
> terminal, it always will connect to database, I can run queries, get
> results but transaction is still not active like it was in the
> example.
Your problem will be solved in 2.6.4 or in trunk.
I tested your code with 3 versions of fpc:
home: > ppcx64-2.6.2 tdb
home: >./tdb
Transaction is NOT active
home: >ppcx64-2.6.4 tdb
home: >./tdb
Transaction is active
home: >fpc tdb
home: >./tdb
Transaction is active
So whatever bug you encountered, it has been fixed meanwhile in FPC.
So as soon as Lazarus releases a version based on 2.6.4, your program will work.
I suspect it is a MySQL specific bug.
(IIRC there were some issues with transactions in MySQL)
Michael.
More information about the Lazarus
mailing list