IF ISCLEAR(ADOCommand) THEN CREATE(ADOCommand); ActiveConnection := ADOConnection; ADOCommand.ActiveConnection := varActiveConnection; ADOCommand.CommandText := 'insert into Some table '; ADOCommand.CommandTimeout := 0; ADOCommand.Execute; ADOCommand.CommandText := 'insert into Some other table '; ADOCommand.CommandTimeout := 0; ADOCommand.Execute;
Answers
CommandText := TextConst1 + Command1 + Command2 + TextConst2;
TextConst1 is a TextConst with the value "beging trans"
TextConst1 is a TextConst with the value "commit trans" or "end trans"
Command1 is a TextConst with the value "insert into table XYZ values ABS"
Command2 is a TextConst with the value "go insert into table TZU values GHT"
?
AdoConn.BeginTrans
and
AdoConn.CommitTrans
The CommitTrans method saves all pending changes made since the last BeginTrans method call was used to initiate a transaction.
Also take a look here on the method RollbackTrans() if needed
Regards