Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last row in a table
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00648365
Message ID:
00648370
Views:
24
>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform