Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exact and deleted recs - did everybody know this but me?
Message
From
24/07/2006 13:50:10
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
24/07/2006 13:37:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01139176
Message ID:
01139312
Views:
12
Alan

I prefer to treat deleted records as GONE! What I do instead is add a datetime field for deactivated. Then I can delete records that are beyond a certain customer-specified age. Further I can retrieve such records under my direct control.

I avoid SQLs that do the equivalent of a SET FILTER. When I run a query I expect a fixed result set.

>Ah. The one thing I didn't try was with both ANSI and EXACT set ON, and the result is the sam as with them both set off. Then that answers the question. That being the case, then am I safe in doing what I'm doing in turning off EXACT and ANSI in order to keep the table's deleted flags set? Or do you think I'm playing with fire?
>
>>W/o NOFILTER VFP may create filtered cursor by applying SET FILTER/SET FIELDS to the source table opened similar to USE...AGAIN. It cannot be done when SET EXACT and SET ANSI doesn't match. I don't think it's documented anywhere.
>>
>>>Ok, you're right with NOFILTER. But if I want deleted records returned to the cursor as deleted, I need to set DELETED, ANSI and EXACT to OFF (and not include the NOFILTER keyword). My question is simply, why do exact and ansi control this? Is it documented somewhere?
>>>
>>>>Sure it does. All deleted records are returned as undeleted for all combinations of SET EXACT and SET ANSI which is expected behavior for SET DELTED OFF.
>>>>
>>>>>I just tried it and it doesn't change anything. With EXACT ON (or ANSI ON) and using NOFILTER, I still get back the deleted record as a non-deleted record in the cursor. I appears to be EXACT and ANSI that are controlling whether or not the deleted record is brought back as a deleted record or as a non-deleted record.
>>>>>
>>>>>I wonder if it's just a bug. Hard to believe this is the intended behaviour - especially since the documentation seems to make no mention of it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform