G
Guest
I want to backup, repair & compact the backend MDB from code within my
application. I have a function that works fine in a simple app that links to
tables in the backend MDB (lets call it Tables.mdb). However, the same
function fails in my more complex app.
I get errors if I try to:
Rename Tables.mdb to Tables.bak
Copy Tables.mdb to another folder
Repair/Compact Tables.mdb
In the simple app, I notice that Tables.LDB does not exist at the time I try
to run my function. However, it DOES exist when I try to run my more complex
app. I assume that's because I have a Form open that is bound to tables in
Tables.mdb when I call my function. And, I assume it's the existance of the
..LDB that is causing the "permission denied" and similar errors.
So, I've tried closing all Forms (in code) prior to trying to execute the
copy / rename / repair commands. However, the .LDB still exists, and the
errors still occur.
How can I get around this problem?
application. I have a function that works fine in a simple app that links to
tables in the backend MDB (lets call it Tables.mdb). However, the same
function fails in my more complex app.
I get errors if I try to:
Rename Tables.mdb to Tables.bak
Copy Tables.mdb to another folder
Repair/Compact Tables.mdb
In the simple app, I notice that Tables.LDB does not exist at the time I try
to run my function. However, it DOES exist when I try to run my more complex
app. I assume that's because I have a Form open that is bound to tables in
Tables.mdb when I call my function. And, I assume it's the existance of the
..LDB that is causing the "permission denied" and similar errors.
So, I've tried closing all Forms (in code) prior to trying to execute the
copy / rename / repair commands. However, the .LDB still exists, and the
errors still occur.
How can I get around this problem?