>Hi Alonso,
>
>>I was thinking about something that i could tell the user exactlly what happened. Something like "Duplicated PK" (this i check before BEGIN TRANS), etc.
>>
>>So, i would issue a ROLLBACK knowing why i had to.
>
>You could also use
>nError=0
>ON ERROR nError=ERROR()
>
>IF nError = 0
> END TRANSACTION
>ELSE
> ROLLBACK
>ENDIF
>
>DO CASE
> CASE nError=0
> ... Transaction succesfull
>
> CASE nError=1
> .... Handle the error
>
> CASE nError=2
> .... Handle the error
>
> ...
>ENDCASE
>You can also use TABLEUPDATE( 2, lForce, Alias, cErrorArray) to check if a transaction is succesfull without using the error routine.
>
>AERROR() is another function that you might find to be helpfull to determine the cause of the error.
>
>Walter,
Thanks, walter. gonna try it as soon as i can!
Like Frank said: "I did it... MY WAY!"