You need a begin transaction somewhere.
begin transaction
lGood = TableUpdate(1, .T., "Table1")
lGood = .F.
IF lGood
end transaction
else
rollback
endif
HTH
Caroline
>Hi
>
>I have this
>
>
>Select Table1
>REPLACE Field1 WITH 1 IN Table1
>
>lGood = TableUpdate(1, .T., "Table1")
>
>lGood = .F. && i create this for an error later
>
>
>IF lGood = .T.
>
>
>ELSE
> ROLLBACK
>
> ** Here i write one error
>
> TableRevert("Table1")
>ENDIF
>
>But , ROLLBACK , Don´t work .
>
>Table1 in field1 was the value 1
>
>Can you help me ?
>thanks
Caroline