The only other solution I can think of is the LINENO() parameter that gets passed to the error handler. However, that only works if you have compile the APP with the DEBUG option checked in the Project Manager Options.
I think the best solution would be some defensive coding.
lnGoRec = some_value_from_somewhere
cMyVarTable = 'Tabla1'
if reccount(cMyVarTable) >= lnGoRec
GO lnGoRec IN (cMyVarTable)
else
do something else here
endif
Mark McCasland
Midlothian, TX USA