Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RECNO() returns 1 for no records
Message
 
 
To
03/05/2004 08:50:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00900340
Message ID:
00900341
Views:
25
>Hi All. Can anyone explain the logic that RECNO() should return a value of 1 when a file has no records? VFP8/SP1. Its in the docs but why? Surely RECNO() should return 0 if there are no records?

That's the way it works since the beginnig of the time. :)
FoxPro always kind of "adds" one blank record at the end of the table.
CREATE CURSOR test (cc C(2))
? RECCOUNT(), RECNO()   && 0 1
APPEND BLANK
SKIP
? RECCOUNT(), RECNO()   && 1 2
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform