Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views and deleted records
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00194164
Message ID:
00194382
Views:
21
>>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
>
>Sure... just add the following column to your view...
>
>deleted() as Deleted
>
>You could display this record some way in your grid with a special background color, or perhaps as a checkbox field or something.
>
>I assume if you undelete (recall) a deleted record in a view, and you tableupdate() it will recall the record in the table.
>
>BOb

Adding deleted() to one of the fields in my view did no reflect a .T. when the view was called up and requeried. The field always indicated a .F., I think the function deleted() is being evaluated after the set is created and by then the select statment has already created the cursor and the record is not deleted in the cursor. If you experiment with it and find this wrong I would like to know. What I did to experiment was to go to the view designer in the database and modify the updateable view to add a field called DELETED(). When I opened the view with the key of a deleted record the cursor field EXP_8 showed .F., indicating that the record was not deleted. I open the main table and look at the record and it is deleted in the main table.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform