Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views will not show deleted records
Message
 
To
15/07/2004 13:12:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00924761
Message ID:
00924821
Views:
15
Oddly, the view correctly displayed the filtered set of deleted records after I removed a related table used in the view. I'm assuming that FoxPro won't display a filtered set of the deleted records, because each deleted record is in a relationship with a non-deleted record from another table.

I find this behavior odd though, since I can display a set of non-deleted records within the same two table view, which basically filters out the records that are marked for deletion. Thus, FoxPro recognizes the deleted records and filters them out (even though each of the deleted records is associated with a non-deleted record from another table). However, it won't show a filtered set of deleted records. I would think that this behavior would be consistent for both Deleted()=.T. and Deleted()=.F. Hmmmmmm

Are views supposed to behave this way or am I still missing something?

Dave

>To make sure that SET DELETED is really OFF, either change or check the option, just before running the view. I want to insist on this, because the fact that different datasessions can have different settings for SET DELETED (and some other commands) has wrought confusion to many a programmer.
>
>To check the current setting:
>
>
>? set("deleted")
>
>
>>Hi Hilmar,
>>
>>This behavior occurs outside of the main application too. I opened the view through the project manager in the main VFP window, and SET DELETED is OFF. The view works fine with DELETED()=.F., but not with DELETED()=.T., which is what is puzzling me. I even made sure SET DELETED was off, buy running the command in the command window.
>>
>>I agree about considering deleted records as gone. However, the client has some very odd requirements, which is requiring me to build a somewhat non-traditional solution.
>
>The usual alternative is to have a field called "excluded", "inactive", "cancelled", or something to this effect. Then, you can easily show inactive clients (for instance), active ones, or both - just change the filter.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform