Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exact and deleted recs - did everybody know this but me?
Message
De
25/07/2006 08:29:02
 
 
À
25/07/2006 03:20:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01139176
Message ID:
01139630
Vues:
15
>>With NOFILTER (and deleted still off), yes, all records are returned and the deleted flag is wiped regardless of any other setting.
>>
>>What I haven't tested yet is whether or not it speeds up the query. That's my next step.
>>
>I have skipped most of the thread so pls forgive if I am totally off target:
>Since you seem to use SQL-Select, would not something like
>Select *, deleted() as lWasdeletd from ...
>fill your need the keep the info on the deleted() status of the base table for your next steps ?
>
>regards
>
>thomas

Looks like this is going to be the best option. I just discovered something more about this whole process which means I can't use my own method in a consistent way anyway.

This is the problem.

With SET DELETED OFF:
SELECT id, firstname, lastname FROM tablename INTO CURSOR crsTemp
Will return deleted records with the deleted flag still set. However,
SELECT id, UPPER(firstname), UPPER(lastname) FROM tablename INTO CURSOR crsTemp
Will wipe out the deleted flag.

UPPER() is just for illustrative purposes. Any function, or adding < something as field > in the select will wipe out the deleted flag. In some instances in this code, functions are used. So, it looks like your method is about the only way I can do what I need to.

Thanks for the suggestion. So, the above then becomes:
SELECT id, UPPER(firstname), UPPER(lastname), DELETED() as deletedrec ;
FROM tablename INTO CURSOR crsTemp
And it works.

Again, thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform