General information
Category:
Coding, syntax & commands
Using a framework that shall remain nameless(and blameless), I had a GOTO tiRecNo return an error. It turned out to be my own stupid fault, trying the GOTO on an empty table. I didn't catch it because RECNO() on the table returned 1, as the helpfile states it should. That led me to this little gem:
IF RECNO() <= RECCOUNT()
GOTO tiRecNo
ELSE
*Error handling time.
ENDIF
This will return .F. for BOF(1>0), EOF(10>9) and empty table(1>0) conditions, essentially checking for three possible error conditions at the same time.
Don't know if this is a known trick or not, but here it is, and I hope someone finds it useful.
Next
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