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:
00845947
Message ID:
00847125
Views:
24
Ron,
The problem may be that the DELETED() function may be acting on a different table.

When you specify multiple tables in a query and use functions like recno(), reccount() or deleted(), you don't know which table it is using when it returns the value. You can't specify an alias in the function because a query reopens tables in new work areas giving them different aliases and once again, the function would be acting on a different work area.

It is better, IMO, to issue SET DELETED ON and let VFP filter out deleted records internally. All deleted records from every table will be excluded.

HTH.

>Larry,
>
>I have included the exact source of the view as I'm using at the bottom.
>The thing I trying to achieve is to do some checking before commiting any changes to the database.
>I therefor check the contents of the view and I want to determine a number of things (duplicates being one of them).
>If the view contains duplicates I have a query that shows that. The problem starts when I delete a row and ask the question again. The duplicate is still being shown although it was deleted. If I ask deleted() on the row it returns .T. If I ask to return all NOT deleted rows it will include the one I just deleted. If I ask for all deleted rows it will return nothing.
>I find this very weird that I can't ask this question to a view. I must be missing here but I still have not found an answer for this.
>
>Regards,
>
>Ron Brahma
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform