Copy a database while open

  • Thread starter Thread starter Steven M. Britton
  • Start date Start date
S

Steven M. Britton

I want to add a button that will make a copy of the
current database and sent it to a flash drive that is
defaulted to the E:\ drive. Is there some code out there
that can do this? Or can you send me in a good direction?

-Steve
 
Steven said:
I want to add a button that will make a copy of the
current database and sent it to a flash drive that is
defaulted to the E:\ drive. Is there some code out there
that can do this? Or can you send me in a good direction?


You should never copy on open file, you can not be sure the
file is in a stable state. This is especially true with
database files where all kinds of things are going on behind
the scenes.

Find another way to deal with whatever problem you hoped
this would solve.
 
"Us" would be "subject matter experts," such as Marsh -- and myself. Tim, it would be a mistake to challenge me on ability in MS Access.

I have copied databases using the method I described above successfully. During the copy, since it is run essentially modally, you can ensure there are no concurrent updates to the MS Access system tables. As this is an API call to to a Windows function, it could well be argued that the database is in a state of "quiet" during this copy.

I rarely find second-guessing requirements to be appropriate in this forum, considering we have not been involved in the JAD sessions that produced them.

There are a few reasons I have been a successful contractor during these miserable lean times of the last few years. And listening to the client, and delivering on their needs, would be very high on that list.

David Atkins, MCP
 
"Us" would be "subject matter experts," such as Marsh -- and myself.
Tim, it would be a mistake to challenge me on ability in MS Access.

Wouldn't dream of it: I was simply responding to a hostile attack on a
regular MVP and helper, coming from an anonymous address. Nice to see you
have a name this time.

All the best


Tim F
 
My not listing my name would be fair enough for your prod; in fact, it was an omission on my part.

I have posted numerous times, most often a number of months ago, with the same handle. I *almost* always list my name, unless it's an obvious answer or one-liner.

I've seen your posts many times, and respect your ability.

David
 
My not listing my name would be fair enough for your prod; in fact, it
was an omission on my part.

I have posted numerous times, most often a number of months ago, with
the same handle. I *almost* always list my name, unless it's an
obvious answer or one-liner.

I've seen your posts many times, and respect your ability.

We have all seen flames addressed to our regular MVPs, and as someone who
regularly learns from them, I felt a bit defensive. Yes, Marsh can fight
his own battles if he needs to too! If I had recognised your name I
certainly would have kept quiet.

Best wishes


Tim F
 
Back
Top