Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USE (all tables) again in 0
Message
 
À
28/08/2003 07:25:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00823712
Message ID:
00841860
Vues:
21
>Hi Grigore
>
>>Please correct me if I am wrong, but I vaguely recall SET VIEW TO does not restore the sort order as it was at the creation moment.
>
>No, when you create an environment view, the name of the controlling index tag is saved and, when the view is restored, the same index will be set.
>
>I think you may be thinking about the record pointers (which are not saved) but both the Indexes in use, and any Relations that have been defined, are preserved and restored.

Beware...

Grigore is right - the index tag is not always reset. In VFP 6 and 7 I have found if you have one or more temporary cursors open, then it's pot luck for the index tags on the other tables. Obviously, you cannot restore a cursor that doesn't exist anymore, but it makes no sense that it would affect the real tables.

I don't have VFP 8 yet to try it there.

Example:
USE table1 IN 0 ORDER TAG tag1
USE table2 IN 0 ORDER TAG tag2
SELECT * FROM table1 WHERE fld1 = value INTO CURSOR csrTemp NOFILTER
CREATE VIEW mytables
CLOSE DATA ALL
SET VIEW TO mytables
Either table1 or table2 will not have it's order restored. Run the example with just table1, and it will definitely be the one missing a set order.
Scott McDaniel
MCP VFP Desktop
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform