Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last row in a table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00648365
Message ID:
00648370
Vues:
25
>hey everyone,
>is there a way to look at the last row in a table. what i am trying to do is add on to sequence numbers
>in a table. i want to look at a table's field, for this example we will call it seqnum, and say
>something like seqnum + 1 for every new insert i make into the table. this way i keep the numbers in
>sequential order. any advise would be appreciated. thanks.

The answer you're looking for is:
lnRecNo = RECNO()
GO BOTTOM
*!* Get value
GO (lnRecNo)
That's not what you want to do, though -- what happens if two users try to do an insert at the same time, and both get the same number? Check in TasTrade.DBC for the NextID() function: that is a better way to handle auto-increment. Also, auto-increment has been announced as a feature for the next version of VFP.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform