Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending from several tables
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01217264
Message ID:
01217587
Views:
12
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform