Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Page frame and free tables
Message
De
01/11/2002 12:05:28
 
 
À
31/10/2002 17:39:58
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00716909
Message ID:
00717884
Vues:
17
An alternate method to temporary tables is to use the READWRITE option in VFP7.

SELECT *
FROM names
INTO CURSOR curNames READWRITE


If you are not using VFP7 the following syntax will get you there as well:

SELECT *
FROM names
INTO CURSOR curTemp

lcDBF = DBF()

USE (lcDBF) AGAIN ALIAS curNames
USE IN curTemp
SELECT curNames

INDEX ON id TAG id
INDEX ON lname TAG lname
SET ORDER TO

REPLACE lname WITH "SMITH" FOR lname = "JONES"


The idea here is that, in VFP6 a temporary file is created on your harddrive with a unique name which holds the data. DBF() will tell you the exact filename that was used to create the "curTemp" cursor. Using this file again will make it READWRITE. When you close the "curTemp" cursor it is not destroyed because it is still in use with "curNames".

In my opinion, temporary files should be unnecessary when CURSORS are already considered to be temporary files.
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform