Newbie here with perhaps a fundamental problem that I can't seem to resolve. In one part of my application I open a connection to a specific file (free table) and a recordset associated with that connection -- and leave the connection and recordset open. In another part of the application I want to delete the FILE.
I've tried closing both the connection and recordset, and setting them to Nothing (as well as the recordset's Active Connection). I then establish a FileSystemObject and attempt to delete the file with:
HRfso.DeleteFile ("GHM_V70.HST").
I'm getting a "Permission Denied" error because the file is in use. (I know the file is "in use" because in testing if I don't open the connection and recordset the DeleteFile succeeds.)
How to resolve? Thanks.
I've tried closing both the connection and recordset, and setting them to Nothing (as well as the recordset's Active Connection). I then establish a FileSystemObject and attempt to delete the file with:
HRfso.DeleteFile ("GHM_V70.HST").
I'm getting a "Permission Denied" error because the file is in use. (I know the file is "in use" because in testing if I don't open the connection and recordset the DeleteFile succeeds.)
How to resolve? Thanks.