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 14:36:53
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
24/07/2006 14:01:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01139176
Message ID:
01139355
Views:
17
>Unfortunately, I'm working with code that has been around a while and there are parts that depend on ignoring deleted records (as you say, treating them as GONE!). The problem is that a couple of the Select SQL statements into arrays take about 10 seconds (or longer) to run either with DELETED set to ON or with the 'and !DELETED()' added to the SQL statement - even though there is an index tag for DELETED().
>
>So what I wanted to do was to set DELETED OFF, do the select getting back all deleted records into a cursor (with their flags still set), and then select that cursor into the array with DELETED set back to ON. When I do that, I end up with the correct result, but it only takes a fraction of a second to do both steps together.
>
>The question now, of course, is whether or not I can count on the behaviour remaining as it is. If so, then I'm ok. If not, then I have to find some other way to speed up the Selects so i don't get killed by this changing on me later.

I think the behavior you're using will not change. However, since you've SET DELETED OFF the DELETED() tag you mentioned to Tore won't help you. You may be able to produce your arrays (shudder) completely without SQL and possibly faster.

Since SQL normal behavior is to return undeleted records, I would avoid trickery. Use xBase code to build your arrays and it would become more obvious what you're doing.
Previous
Reply
Map
View

Click here to load this message in the networking platform