col
Mar 26 2005, 03:31 PM
Everyone,
is there a way programically to copy a database over another?
col
Mar 26 2005, 04:44 PM
I'm trying to use this code to make a backup copy of the database when it opens, but get a permission denied error. Both files exist. I want to overwrite the database_backup.mdb each time the database opens or when specified by the user. please help. thanks.
Function CopyDB()
Dim Location As String
Dim FileName As String
Dim BackupFileName As String
Location = "C:\Program Files\Database"
FileName = "database.mdb"
BackupFileName = "database_backup.mdb"
FileCopy Location & "\" & FileName, Location & "\" & BackupFileName
End Function
r_cubed
Mar 26 2005, 05:48 PM
Look at the KILL command (which will 'kill' your exisitng backup) BEFORE doing the FileCopy