Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
APPEND FROM behaviour
Message
De
20/07/2002 16:15:12
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00680809
Message ID:
00680812
Vues:
18
Sergey - thanks for the tip!

Barry


>As you found out, APPEND FROM < TableB > always looks for the table TableB.dbf on the disk regardless if it's open or not already. You can inssure that a table open under specific alias is used with DBF() function.
APPEND FROM (DBF("tableb"))
>
>>Not so much a question – more an observation that may help others avoid a difficult to find bug I recently encountered.
>>
>>When using APPEND FROM to add a set of records from table B to the end of table A, I found I was getting an incorrect set added. I had both tables open at the same time and the FOR condition applied to table B as a BROWSE achieved the correct subset of results. However, when applying the FOR condition to the APPEND FROM a different set of results was being passed across to table A.
>>
>>I discovered that the APPEND FROM will always search for table B along the default path. APPEND FROM ignored the fact that I already had the intended table B open. I had an old version of table B higher up the search path than the one currently open and this one had spurious records some of which met the FOR criteria and were being added to table A.
>>
>>You can avoid this trap by specifying the full path to table B or making sure that you only have a single instance of the file in the search path (which most folk will!).
>>
>>Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform