Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending from several tables
Message
De
19/04/2007 18:02:10
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01217264
Message ID:
01218068
Vues:
18
>>Naomi
>>
>>The code is just as below
>>Do you think it's able to append from tables of
>>an old folder to a new folder, even if the new folder has
>>more tables than the older one ?
>>
>>lnOldTables = adir(laOldTables, MyOldPath + "*.dbf")
>>lnNewTables = adir(laNewTables, MyNewPath + "*.dbf")
>>
>>for lnI = 1 to lnNewTables
>>   lnRow = ascan(laOldTables, laNewTables[m.lnI,1],1,-1,1,15)
>>    if lnRow > 0
>>    wait window timeout 2 "Importing from file " + laOldTables[m.lni,1]
>>         use (laNewTables[m.lnI,1]) exclusive in 0 alias NewData
>>         zap
>>         append from (myOldPath + laOldTables[m.lnRow,1])
>>         use in NewData
>>  endif
>>NEXT
>
>I don't see a bug here, so I think it should work.

Am I missing something here????
use (laNewTables[m.lnI,1]) exclusive in 0 alias NewData
zap
etc
NewData is never SELECTed so unless there is no file open in the current workarea, the wrong file will be zapped and appended to.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform