Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record pointers on empty cursors/tables
Message
De
02/02/2004 09:53:32
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00872917
Message ID:
00872935
Vues:
14
Great. So I need to use something like RECCOUNT() instead?

>It's not going to work because RECNO() = 1 for empty table/cursor.
>
>>Yeah, that's pretty much what I thought I would have to do... So, I guess the real issue is that RECNO() is NULL if the table is empty? It has no actual value? Hmmm... I could see cases where RECNO() could be -1 though in the case of added records in a buffer. Maybe the best way would be to check if nRecNo is NULL rather than > 0.
>>
>>>Hi Jay
>>>
>>>This modification should do the trick:
>>>
>>>cAlias = ALIAS()
>>>
>>>nRecNo = RECNO()
>>>
>>>Do Something
>>>
>>>SELE (cAlias)
>>>
>>>IF nRecNO>0
>>>   GOTO nRecNo
>>>ENDIF
>>>
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform