COMMIT or ROLLBACK Store procedure

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mcot
Posts: 2
Joined: Tue 10 Apr 2007 13:24

COMMIT or ROLLBACK Store procedure

Post by mcot » Tue 10 Apr 2007 14:24

hello,
I am trying to use your compent, valuating a future use. I have dropped on a form TmyConnection and TmyStoreprocedure
I have connected the db and assigned a store procedure
to the mystoreprocedure component. Try to execute this simple code
but transaction is commit all the same.

dbconn.StartTransaction;
mystore.Execute;
dbConn.Rollback;

My store procedure calls internally others store procedures. I have tried to
excute a simple storeprocedure with a single instruction "INSERT INTO..." and transaction can rolling back. I am wondering ... must I set something
in particulare to execute more complex Stored procedure? I am using Delphi 2006 and trial mydac 5.00.0.4

Thanks
Marco

mcot
Posts: 2
Joined: Tue 10 Apr 2007 13:24

Re: COMMIT or ROLLBACK Store procedure

Post by mcot » Tue 10 Apr 2007 14:28

mcot wrote:hello,
I am trying to use your compent, valuating a future use. I have dropped on a form TmyConnection and TmyStoreprocedure
I have connected the db and assigned a store procedure
to the mystoreprocedure component. Try to execute this simple code
but transaction is commit all the same.

dbconn.StartTransaction;
mystore.Execute;
dbConn.Rollback;

My store procedure calls internally others store procedures. I have tried to
excute a simple storeprocedure with a single instruction "INSERT INTO..." and transaction can rolling back. I am wondering ... must I set something
in particulare to execute more complex Stored procedure? I am using Delphi 2006 and trial mydac 5.00.0.4

Thanks
Marco
I forgot I use MySQL 5 and innoDB tables

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 11 Apr 2007 13:39

You should not apply any additional setting for MyDAC. I do not think that there will be any problems with MySQL in this case. I recommend consulting this topic of MySQL Reference Manual.

Post Reply