Re: Transactin and Rollback.
- From: "Vitor Martins" <vitor_martins@xxxxxxxxxxx>
- Date: Wed, 27 Feb 2008 16:16:42 -0000
Thanks to all
I resolve the problem. Using one newer connection only for that operation Is
working.
My old connection must commite the first post somewhere.
Is there any tutorial or something about transtions with delphi and ADO?
Vitor
"Vitor Martins" <vitor_martins@xxxxxxxxxxx> escreveu na mensagem
news:47c46045@xxxxxxxxxxxxxxxxxxxxxxxxx
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: Del Murray
- Re: Transactin and Rollback.
- From: Bill Todd [TeamB]
- Re: Transactin and Rollback.
- References:
- Transactin and Rollback.
- From: Vitor Martins
- Transactin and Rollback.
- Prev by Date: Re: Transactin and Rollback.
- Next by Date: Re: Transactin and Rollback.
- Previous by thread: Re: Transactin and Rollback.
- Next by thread: Re: Transactin and Rollback.
- Index(es):
Relevant Pages
|