Click to See Complete Forum and Search --> : Strange MoveFile Problem


alash96
10-26-2004, 04:52 AM
Hi,

I've having a strange problem with MoveFile.
My program works this way.

First, it will create 4 different files if they do not exists e.g. XXShop.mdb where XX is the code of the shop.

After quite a bit of processing, I'll check if there is any data in the XXShop.mdb files. If there is, I'll set a moveFlag to 1 then use MoveFile to move the files from current location to another destination.

The strange thing is, the first 3 files work ok. But the last file will ALWAYS get permission denied error. :confused: :confused:


Please help!!

tomhartland
10-26-2004, 09:11 AM
Are you closing the database connections correctly?

(Are you processing all the MDB's and then trying to move them, or processing each and then moving before processing the next?)

If you are using the same connection variables within the processing loop, the connection to the last MDB might still be active.

Does that make sense?
Tom

alash96
10-26-2004, 08:03 PM
Hi,

Thanks for your response. :)
I only realized that the connection is still open after a night's rest.