Board index » delphi » Transaction,Commit and Rollback

Transaction,Commit and Rollback

Could anyone show me an example or website how to apply these

Begin Transaction
Commit Transaction; and
Rollback Transaction

in Delphi and SQL7.

Thanks in advance.

Regards,
Alex Kong

 

Re:Transaction,Commit and Rollback


If you are using TDatabase ,

procedure Customer.CommitClick(Sender: TObject);
begin
   TDatabase1.StartTransaction;
   try
      TQuery1.ApplyUpdates;
      TDatabase1.Commit;
    except
      TDatabase1.Rollback;
       raise;
    end;
  TQuery1.CommitUpdates;
end;

Bulent Ozkan

Quote
Alex Kong <mlar...@po.jaring.my> wrote in message

news:8mlqg5$8ev2@bornews.borland.com...
Quote
> Could anyone show me an example or website how to apply these

> Begin Transaction
> Commit Transaction; and
> Rollback Transaction

> in Delphi and SQL7.

> Thanks in advance.

> Regards,
> Alex Kong

Other Threads