delphi e oracle

Delphi

14/01/2005

Ola a Todos

estou com um problema com commit no oracle;

quando faço um insert via ado ou dbexpress o oracle ta commitando automaticamente.
gostaria de saber o que configurar para que so commitar quando um passar a instrução commit.

grato pela resposta

wanderley


Mactus

Mactus

Curtidas 0

Respostas

Bon Jovi

Bon Jovi

14/01/2005

Mostre o código pra facilitar.

Exemplo em dbExpress do próprio help do Delphi:

procedure TForm1.TransferButtonClick(Sender: TObject);

var
  Amt: Integer;
  TD: TTransactionDesc;
begin
  if not SQLConnection1.InTransaction then
  begin
    TD.TransactionID := 1;
    TD.IsolationLevel := xilREADCOMMITTED;
    SQLConnection1.StartTransaction(TD);
    try
      Amt := StrToInt(AmtEdit.Text);
      Debit.Params.ParamValues[´Amount´] := Amt;
      Credit.Params.ParamValues[´Amount´] := Amt;
      SQLConnection1.Commit(TD); {on success, commit the changes};
    except

      SQLConnection1.Rollback(TD); {on failure, undo the changes};
    end;
  end;
end;



GOSTEI 0
POSTAR