Results 1 to 3 of 3

Thread: Recno() and Reccount()

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,877

    Recno() and Reccount()

    Hi all,
    I've created a new table, with only 1 field.
    Why, if I type:
    ? recno() I get 1?

    the table is empty..

    I arrived at this test because, sometimes, the instruction "m_recno = recno()" returns a value = reccount () + 1 .. and if I perform a goto(m_recno), I get a error.

    thanks
    Fabio

  2. #2
    Lianja Team davefoss's Avatar
    Join Date
    Feb 2012
    Posts
    111
    Hi Fabio,

    This is expected behavior and exactly what VFP does if there are no records in a table. If the table is at EOF then RECNO() will report RECCOUNT()+1.

    Hope this helps.

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,877
    Thanks Dave,
    you are right.. is true!
    thanks

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us