I'd use adir instead of dir *.dbf, then create a cursor of the tables based on the date in the array - if I'm understanding your program.
Try adir (mydbfarray,'\\thedatapath\*.dbf') If the date in the array for the dbf file is the one you are selecting, you should have a little better performance there. I don't understand your statement about appending from so you won't overwrite the previous SQL? Why not create seperate cursors for each select?
John Harvey
Shelbynet.com
"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright