Back up a Split Database's Backend

  • Thread starter Thread starter scs
  • Start date Start date
S

scs

I did a little searching in the groups but have been unable to find this
information. If someone could offer advice I would really appreciate it.

I have split the database so that multiple people can use it and so I can
continue to develop the front end. I want a button on my swithcboard to
back up the database . I have no problem with that, a simple macro
accomplishes this. My problem is I need away to backup the actual linked
tables int the backend too.

I played around with open database command in macros but I don't understand
what's going on. Any thougts or ideas on the best way to accomplish this.

TIA
 
All you have to do to backup the back-end database is to copy the MDB file.
However, you need to ensure that you do this when no one is using the
back-end database. Otherwise, you run the risk of your backup being
inconsistent, and hence of little use to you.

You can tell whether anyone's using the back-end by looking for the locking
file. If anyone's using the back-end database, the locking file will have
the same name as the database itself, but with an extension of .LDB, rather
than .MDB, and will be in the same folder as the back-end MDB file.
 
Thank you. I don't anticipate any more than two people using this at a
time. It's really going to be used primarily by one person. I mainly just
want them to be able to use it while I'm working on the front-end. However,
it will probably remain split in the end and used by two folks occasionally
at the same time.

I'm looking for a way that a user could enter the front-end and, through a
very user friendly interface, backup the back-end. If I'm understanding you
correctly, this would not be possible because the backend would be in use at
that time by that user.

I was hoping the user could make a quick backup of the data from within
Access before making a bunch of changes. I guess I'll have to develop some
other means outside of Access. Is this correct?

Thanks again.
 
scs said:
Thank you. I don't anticipate any more than two people using this at
a time. It's really going to be used primarily by one person. I
mainly just want them to be able to use it while I'm working on the
front-end. However, it will probably remain split in the end and
used by two folks occasionally at the same time.

I'm looking for a way that a user could enter the front-end and,
through a very user friendly interface, backup the back-end. If I'm
understanding you correctly, this would not be possible because the
backend would be in use at that time by that user.

I was hoping the user could make a quick backup of the data from
within Access before making a bunch of changes. I guess I'll have to
develop some other means outside of Access. Is this correct?

If your app is split then you can still do this from the front end providing
that no bound forms or reports are open at the time you do it. Testing for
the existence of the LDB file will let you know if any bound objects are
currently connected to the back end. When it is not there then it would be
safe to copy the file.
 
Thank you. I undersand what you are saying. If I close all forms in my
frontend the ldb file goes away in the backend directory. Could a macro
close all open forms and somehow copy that backend database somewhere?
Could I do it with VBA? Can you tell me how or point me to more info on the
subject.

Thanks again.
 
scs said:
Thank you. I undersand what you are saying. If I close all forms in
my frontend the ldb file goes away in the backend directory. Could a
macro close all open forms and somehow copy that backend database
somewhere? Could I do it with VBA? Can you tell me how or point me
to more info on the subject.

You don't have to close all forms, only all forms bound to tables in the back
end. So you could still have a form opened that has a button that performs the
backup. Code in that button could loop through the Reports collection and the
Forms collection (backwards) closing all reports and all forms except for the
one running the code. Then the code can look for the presence of the LDB file.
If not found, make the backup copy. If found you can report that instead (which
would mean someone else might be in the file).
 
Thanks! That's pretty easy and works well.

Bob Miller said:
I create a Backup database and then use Make Table Queries to create
tables in the Backup db of the linked tables in the front end. You can
create a macro or code that runs each query from a switchboard or menu
bar. I usually open a form that says "Running Backup" before opening
the Make Table Queries and close that form after the last Make Table
query has been run.
You can probably find some code somwhere that checks to see if the
Backend is open before running the Queries.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top