My Assistant
![]() ![]() |
|
|
Mar 26 2005, 03:31 PM
Post
#1
|
|
|
UtterAccess Veteran Posts: 374 |
Everyone,
is there a way programically to copy a database over another? |
|
|
|
Mar 26 2005, 04:44 PM
Post
#2
|
|
|
UtterAccess Veteran Posts: 374 |
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 |
|
|
|
Mar 26 2005, 05:48 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 3,752 From: Australia (NSW) |
Look at the KILL command (which will 'kill' your exisitng backup) BEFORE doing the FileCopy
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 18th May 2013 - 11:11 AM |