Transactin and Rollback.
- From: "Vitor Martins" <vitor_martins@xxxxxxxxxxx>
- Date: Tue, 26 Feb 2008 18:53:56 -0000
Hi
Why the code below , don´t do a Rollback in the insert in the first table,
DsetStockDoc.?
Only do the Rollback of the inserts in the cicle FOR!
Thanks in advance
Vimar
dtmpri.cnx_cv2.BeginTrans;
dtmpri.cnx_cv2.IsolationLevel:=ilReadCommitted ;
try
dsetStocKDoc.Insert;
....
...
dsetStockDoc.Post;
// a inserting detail
for i:= 1 to sgrid.RowCount - 1 do
begin
dsetStockDoc_detalhe.Insert;
.....
.....
dsetStockDoc_detalhe.post;
end;
dtmpri.cnx_cv2.CommitTrans;
except
on E:Exception do
begin
dtmpri.cnx_cv2.RollbackTrans;
messagedlg( ' Doc not Saved.
ERROR='+e.Message,mtwarning,[mbok],0);
end;
end;
.
- Follow-Ups:
- Re: Transactin and Rollback.
- From: Vitor Martins
- Re: Transactin and Rollback.
- From: Vitali Kalinin
- Re: Transactin and Rollback.
- From: Del Murray
- Re: Transactin and Rollback.
- From: Bill Todd [TeamB]
- Re: Transactin and Rollback.
- Prev by Date: Re: Transactin and Rollback.
- Next by Date: Re: Transactin and Rollback.
- Previous by thread: Brain Dead on SQL statement
- Next by thread: Re: Transactin and Rollback.
- Index(es):