can rollback be applied for stored procedures?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
charbel
Posts: 15
Joined: Fri 02 May 2008 06:42

can rollback be applied for stored procedures?

Post by charbel » Wed 28 May 2008 08:21

hey there,
im calling a stored procedure on edit event of a specific table, and after that this table may be canceled which will call rollback . does the stored procedure executed will be rollback?
if so what should my code contains?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 28 May 2008 14:30

In order to rollback of the stored procedure executing, the TMyStoredProc and TMyTable or TMyQeury should have the same connection. Also the FetchAll property of these components should be set to True.
Call the TMyConnection.StartTransaction method before editing table and executing stored procedure.
Call the TMyConnection.Rollback method to rollback the changes.

Post Reply