Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for lock without locking
Message
 
 
À
02/12/2004 18:49:52
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Versions des environnements
Visual FoxPro:
FoxPro Windows
Divers
Thread ID:
00960484
Message ID:
00966572
Vues:
7
Hi Robin,

I think a cursor would be better. No need to worry about temp table name or location and it gets deleted by FoxPro as soon as it's closed.
SELECT * FROM xxxx WHERE RECNO() = nnn ;
	INTO CURSOR crsTemp
* Make cursor read/write
USE (DBF("crsTemp")) AGAIN ALIAS appendme	
*   make any changes to APPENDME record here
...
SELECT xxxx
APPEND FROM(DBF("appendme"))
USE IN appendme
USE IN crsTemp
>And now for something completely different.
>
>
>SELECT * FROM xxxx WHERE RECNO() = nnn INTO TABLE C:\TEMP\APPENDME.DBF
>*
>*   make any changes to APPENDME record here
>*
>SELECT xxxx
>APPEND FROM c:\temp\appendme.dbf
>USE IN APPENDME
>ERASE C:\TEMP\APPENDME.DBF
>
>
>
>Two things happen:
>
>1) You don't have "empty" records in your table
>2) You have only one line of code where the table is changed, not two ( APPEND BLANK and GATHER ) or ( APPEND BLANK and REPLACE )
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform