Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining the last record in a DBF
Message
 
To
10/01/2006 09:29:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01085156
Message ID:
01085175
Views:
20
>>>>How would I determine the last record in a DBF using SQL?
>>>>I've seem some examples on the net but they are = sql engine specific.
>>>
>>>You specify DBF, is that a typo? If no, use VFP code in stead of SQL. USE the table, and GO BOTTOM.
>>
>>I'm using VFPOLEDB to connect to a free DBF table but want to use SQL to determine the last record.
>
>Sorry, but my experience with VFPOLEDB is zero. Unless you have some key information to determine the record number or when the record was added, you simply have to Select all the records as far as I understand.

This comes down to just plain old VFP DBF's. I want to use an SQL statement to determine the last record. I think I just hit it. How bout;
SELECT INV_nbr,item FROM mytable WHERE RECNO()=RECCOUNT()
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform