dbTalk Databases Forums  

Back up split database

comp.databases.ms-access comp.databases.ms-access


Discuss Back up split database in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bborden51@NoSpamgmail.com
 
Posts: n/a

Default Back up split database - 12-11-2004 , 02:53 PM






I'm surprised that when I go to File-->Backup Database within Access
only the front end is backed up.

Surely I'm missing some setting that I have to select so Access backs
up both front end and back end.

Any ideas?

Thanks


Reply With Quote
  #2  
Old   
pietlinden@hotmail.com
 
Posts: n/a

Default Re: Back up split database - 12-11-2004 , 09:05 PM






you're surprised? Umm... and how exactly is Access supposed to figure
out you're using a split database unless you tell it? Write a batch
file?

Umm... am I supposed to be surprised that you're not psychic and didn't
figure this out/read my mind?


Reply With Quote
  #3  
Old   
Tony D'Ambra
 
Posts: n/a

Default Re: Back up split database - 12-12-2004 , 04:24 PM



You need to open the back-end and back it up...

Tony D'Ambra
Web Site: aadconsulting.com
Web Blog: accessextra.net

"bborden51 (AT) NoSpamgmail (DOT) com" <bborden51 (AT) gmail (DOT) com> wrote

Quote:
I'm surprised that when I go to File-->Backup Database within Access
only the front end is backed up.

Surely I'm missing some setting that I have to select so Access backs
up both front end and back end.

Any ideas?

Thanks




Reply With Quote
  #4  
Old   
Jim M
 
Posts: n/a

Default Re: Back up split database - 12-15-2004 , 01:01 AM



Question: I didn't know there was a "File-->Backup Database" command in
Access. I am using Access 2002 (XP) and have never seen that menu
option. Is it only in Access 2003? or do you require certain references
or add-ins for it to work?

Thanks!
Jim


Reply With Quote
  #5  
Old   
bborden51@NoSpamgmail.com
 
Posts: n/a

Default Re: Back up split database - 12-16-2004 , 06:43 PM



Jim: It does exist in Access 2003 but I found out that it was not in
Access 2002.

I wish it would backup the program AND it's linked tables instead of
just the programs but I just put a button VB procedure on a form to
backup the tables. I copied some of the code from this NG. Here it
is:

Private Sub cmdBackupTables_Click()
sAppFileBruce =
"C:\SurgeonDatabase\Backup\BackupforBruce\BruceTab leBackup" &
DatePart("m", Date) & DatePart("d", Date) & DatePart("yyyy", Date) &
".mdb"
sAppFileOld = "C:\SurgeonDatabase\Backup\OldTableBackup.mdb"
sAppFileBak = "C:\SurgeonDatabase\Backup\CurrentTableBackup.mdb"
sAppFileData = "C:\SurgeonDatabase\Program\WorkingTableDB_be.mdb"

Dim cnn As ADODB.Connection
Dim rst As New ADODB.Recordset
Set cnn = CurrentProject.Connection
rst.ActiveConnection = cnn
rst.Open "SELECT * FROM tblCompanyFacts", cnn, adOpenKeyset,
adLockOptimistic, adCmdText
rst.MoveFirst

If rst.Fields("BackupCounter") >= 3 Then
If Len(Dir(sAppFileBruce, vbDirectory)) <> 0 Then
Kill sAppFileBruce
End If
FileCopy sAppFileData, sAppFileBruce
rst.Fields("BackupCounter") = 0
End If

Kill sAppFileOld
FileCopy sAppFileBak, sAppFileOld
Kill sAppFileBak
FileCopy sAppFileData, sAppFileBak

MsgBox "Your Data Table has been backed up!", vbOKOnly

rst.Fields("BackupCounter") = rst.Fields("BackupCounter") + 1
rst.Fields("LastBackup") = Date()
rst.UpdateBatch
tboLastbackup.Requery
rst.Close
Set rst = Nothing
Set cnn = Nothing

End Sub


Reply With Quote
  #6  
Old   
Jim M
 
Posts: n/a

Default Re: Back up split database - 12-18-2004 , 08:11 PM



is the code you are using adding records to a single backup database?
Just a thought about this: Coudn't you use the VBA copyfile procedures
using the scripting file system objects that are listed in Helen
Feddema's stuff referenced above. Youc could modify them to copy your
back end file instead of the Current Database, as she has the code.
This would give you a newly named file each time you back up. I'm not
sure the code you are using does that... (I always struggle reading
other people's code.)

I am trying to figure out a way to:

1) Backup the database, then
2) Run compact and repair with the push of a button.

Helen's code looks like it could handle the backup with a little
modification.

The tricky thing with this is that I need to disconnect all the links
before I can compact and repair. I would then want to restore the
links. It should not be too hard.

My end users have a hard time remembering to open the back end to
compact and repair...


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.