Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views and deleted records
Message
From
04/03/1999 15:23:25
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00194164
Message ID:
00194174
Views:
19
Bret ---

The answer to this question depends GREATLY on whether or not it's a local view or remote view and a number of other factors.

Local view: If SET DELETED is OFF, you are right, a view returns deleted records from the source table with no indication that they are deleted. You could always add a logical flag to the base table to indicate deletion status and set this flag when a record is deleted. Then when you REQUERY() the view, do an automatic DELETE WHERE to the view based on that flag so that the records look and feel the old-fashioned deleted way (With SET DELETED OFF, of course)

Remote view: Once a TABLEUPDATE() is issues, most server databases "disappear" the record and it's lost forever. The trick is to *not* update the back-end for deleted records until you're sure they will be deleted. How you implement this depends on the process you're following for UI and biz logic.


>This may seem an easy question, but I would like to know this. I have an updateable view, the user lls up the record and deletes it. A save is done and then the view updates the main table. The main table reflects that the record is deleted. Now the user wishes to chnage their mind and recall the record, but when the view runs again the data is shown but there is no indication that this record (1 of 10 in the view) is deleted. Is there a way to have a view return records showing deleted and not deleted records.
>
>TIA
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform