Transaction - how many ADOQuery required?
- From: "Naser" <n_fadaei@xxxxxxxxx>
- Date: Sat, 8 Mar 2008 08:51:21 +0330
Hi. Consider the following Transaction. Can I use only one ADOQuery (i.e.
ADOQuery1) for all the three "INSERT INTO" statements?
(Delphi 7 and MSAccess .mdb)
// start the transaction on the connection
ADOConnection1.BeginTrans;
try
with ADOQuery1 do
begin
//INSERT INTO statement to table1
ExecSQL;
end;
with ADOQquery2 do
begin
//INSERT INTO statement to table1
ExecSQL;
end;
with ADOQquery3 do
begin
//INSERT INTO statement to table2
ExecSQL;
end;
ADOConnection1.CommitTrans;
except
On E:Exception do
begin
ADOConnection1.RollbackTrans;
end;
end;//try
.
- Prev by Date: Transaction - how many ADOQuery required?
- Next by Date: Re: Transaction - how many ADOQuery required?
- Previous by thread: Re: Transaction - how many ADOQuery required?
- Index(es):
Relevant Pages
|