Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for specific advice when using CursorAdapter
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01060454
Message ID:
01060489
Views:
18
Jon,

>Prior to CA - when a user deletes a record from a form, it gets marked as deleted and can be reused at a later time if a new record is added to the same table. When working with VFP-native CA, we're kind of stuck on how to deal with deleting a record, and its aftermath....

Treat deleted records just like you would in SQL Server and you'll be in much better shape when you move there later. In other words, don't try to re-use the deleted records, but instead run with SET DELETED ON and get rid of them in the VFP cursor that updates the VFP table.

>We'd like to allow the user to be able to re-add the same key, if need be...

Is there any good reason to do that (other than to re-use a record in a DBF?) Are your VFP tables free or in DBC? Primary key defined as such or not? Unless you have an extremely compelling reason to re-use keys, just delete 'em and avoid the hassle.

>We also have some tables that have 2 or 3 key fields in the record as well...

No problem for CursorAdapter. Just set the .KeyFieldList to as many fields as are necessary to uniquely identify a record:
.KeyFieldList = "site_id,cust_id,someother_field"
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform