Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending from several tables
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01217264
Message ID:
01217587
Vues:
13
>It works, but does not append
>There's no error message
>
>Could you please take a look ?
>
>
>SET EXCLUSIVE OFF
>
>STORE my_old_dir TO MyOldPath
>STORE CURDIR() + "/data" TO MyNewPath
>
>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
>         use (laNewTables[m.lnI]) exclusive in 0 alias NewData
>
>         zap
>         append from (myOldPath + laOldTables[m.lnRow,1])
>         use in NewData
>  endif
>NEXT
Hmm, I see a missing SELECT NewData before ZAP. I hope you did make a backup first.

Also make sure you don't have ON ERROR in effect or code in ERROR method in this form which may eat possible errors.

Also did you try to step through the code in debugger to see, if it's doing anything?

Also use fullpath("") instead of curdir() as was recommended.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform