Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the standard sequence of record in a data entry f
Message
From
17/03/2000 19:13:08
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00346945
Message ID:
00347360
Views:
16
Hi Steve,

>What's the standard if you have a history tracking DB,
>do you sequence from newest to oldest or oldest to newest and use index descending or ascending order to control the sequence when displaying the records one at a time on a data entry form?

I usually show history records, like perhaps a log of system activities, with the most recent entries at the top. I create the INDEX tag on date or datetime and SET ORDER TO tag DESC. Mostly a matter of preference.

>Also, if you want the user to return to the last record that they worked on prior to exiting the app, would you just save the record ID in a separate table and grab it when the app is restarted? Or is there a better way to identify which record a particular user last worked on prior to QUIT an app.

Every table should have a Primary Key field with unique non-duplicated values that can consistently identify each row in the table, no matter what its RECNO() is at the moment. A dependence on RECNO() will bite you when you PACK a table or otherwise have to rebuild or merge tables.

Store the primary key value and you can *always* get back to that record.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Reply
Map
View

Click here to load this message in the networking platform