Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page frame and free tables
Message
From
01/11/2002 12:05:28
 
 
To
31/10/2002 17:39:58
Irv Adams
MSC Managed Care, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00716909
Message ID:
00717884
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform