example ?
BEGIN TRAN
IF !TABLEUPDATE(2,.T.,"mrn")
=AERROR(ERRORARRAY)
DO CASE
CASE ERRORARRAY(1)=1884
m.msg="M.R.N already exists "
=MESSAGEBOX(m.msg,16,m.productname +"Message")
ROLLBACK
* thisform.command1.setfocus
RETU 0
CASE ERRORARRAY(1)=1539
m.msg="Cannot be modified"
=MESSAGEBOX(m.msg,16,m.productname +"Message")
ROLLBACK
* thisform.command1.setfocus
RETU 0
ENDCASE
ENDIF
*** by ra - remove seperate begin tran endtran
sele godown
=TABLEUPDATE(.T.)
END TRAN
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only