Backing up database (1 Viewer)

rodneyb

Registered User.
Local time
Today, 13:52
Joined
Jul 3, 2003
Messages
84
Hi,

I currently use the following code for an Access97 application to backup the frontend and backend files:

'copy database to predefined directory
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile dbCopyLoc & "\*.mdb", archivePath, True
Set fso = Nothing

However due to the fact that the frontend file doesn't change at all I want to only backup the backend file but when I change the relevant code to:

fso.CopyFile dbCopyLoc & "\BackEnd.mdb", archivePath, True

an error message displays stating "Permision denied" - am I doing something wrong here? if not is there a way to get around this?

Thanks,
Rodney.
 

namliam

The Mailman - AWF VIP
Local time
Today, 14:52
Joined
Aug 11, 2003
Messages
11,695
Search the forum, its either a FAQ or a SAMPLE!

Regards
 

Eniac

Canadian Nerd
Local time
Today, 08:52
Joined
Jun 8, 2004
Messages
23
The previous poster is right, I remember seeing an example of how to backup a database in the FAQ i think....

BUT!

that will be no use if you have no write access on the disk.

The error you mentionned often occur when you trying to write on a remote disk (like mapped drive ?)

Most of the time its the login you use to connect on the pc.

I've seen cases where the program won't use the login I used but a predetermined login (for instance IUSR_[MACHINENAME])

my case was for a website but maybe access does the same.

In short, find the user that is being used and check his access rights.
 

Users who are viewing this thread

Top Bottom