Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
APPEND FROM a cursor
Message
 
À
20/05/2012 14:03:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 5
OS:
Windows 7
Divers
Thread ID:
01543868
Message ID:
01543878
Vues:
50
>>>>>Hi All:
>>>>>
>>>>>I always thought that you cannot APPEND FROM a table that is in USE. If this is true, would the following work:
>>>>>
>>>>>
>>>>>select * ;
>>>>>from table1 ;
>>>>>into cursor curTest
>>>>>
>>>>>lcDbf = dbf(curTest)
>>>>>
>>>>>USE IN curTest
>>>>>
>>>>>use table2
>>>>>APPEND FROM (lcDbf)
>>>>>
>>>>>
>>>>>Thanks,
>>>>>
>>>>>Yossi
>>>>
>>>>No it won't work, because you close the cursor.
>>>>When you close it the table behind disappears.
>>>>But this should work:
>>>>
>>>>select * ;
>>>>from table1 ;
>>>>into cursor curTest
>>>>
>>>>lcDbf = dbf(curTest)
>>>>
>>>>use table2
>>>>APPEND FROM (lcDbf)
>>>>
>>>
>>>But if I make changes to the data in the cursor, how can I be sure that all the changes have been flushed to the DBF on the disk?
>>
>>The physical file on disk may not exists at all.
>
>Thanks


O, one more thing.
When you try to do thing like this make sure that you didn't have filtered view instead of cursor.
Not sure if on VFP5 there is NOFILTER, if there is not just add one more field to this cursor.
...
select *, 1 AS NoMatter ;
from table1 ;
into cursor curTest
...
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform