Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page frame and free tables
Message
From
01/11/2002 17:21:02
Irv Adams
MSC Managed Care, Inc.
Florida, United States
 
 
To
01/11/2002 12:05:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00716909
Message ID:
00718053
Views:
16
Thanks for the tip...DBF() command and USE AGAIN simulate the VFP 7 READWRITE Cursor. Good information!

-Irv.

>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform