You have USE command without in 0 clause. Of course it closes currently open alias <g>
USE (m.StoreDir + "\" + aDocsToBeCopied[m.xx, cDocYrMth] + aDocsToBeCopied[m.xx, cDocID] ;
> + PADL(ALLTRIM(STR(aDocsToBeCopied[m.xx, cDocSeq], 3, 0)), 3, '0') + ".dbf") ALIAS ToAppendTo
If it's not broken, fix it until it is.
My Blog