General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only