Transaction not assigned ????

Delphi

22/11/2004

Pessoal um help
Estou usando o DBExpress com Firebird, quando eu chamo esta função pela primeira vez funciona tudo normal apartir da segunda ocorre este erro de Transaction not assigned...
Alguem pode me dar uma luz o código é o seguinte:

public
TD: TTransactionDesc;
.....

procedure TDtmPrincipal.Transacao(Operacao : String);
begin
try
if Operacao=´Start´ then
begin
if not ConSinomec.InTransaction then
begin
TD.TransactionID := 1;
TD.IsolationLevel := xilREADCOMMITTED;
ConSinomec.StartTransaction(TD);
end;
end
else
if Operacao=´Commit´ then
ConSinomec.Commit(TD)
else
if Operacao=´Rollback´ then
ConSinomec.Rollback(TD);
except on E: Exception do
begin
ShowMessage(´Ocorreu o seguinte erro ao executar a transação: ´ + e.Message);
end;
end;
end;


Volnei Rebouças

Volnei Rebouças

Curtidas 0
POSTAR