Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying database from server to local machine

Status
Not open for further replies.

dlingo

Programmer
Nov 19, 2001
60
US
This shouldn't be a complex problem, but here goes. I've created an application that exports an Access database into Excel in a web-based environment for one of our customers . To do this I've used the Access and Excel object libraries and written a VB standard executable that is called using ASP. Ofcourse, for this application to work it requires the server machine to have Access and Excel installed. This is not the case and I've been told this will not be done. Since only about 6 people have to access this application, I've decided I'm going to run the application off of my machine using PWS (the customer is on the same local intranet as me). I have both Access and Excel and have tested the application on my machine and it works perfectly. However, to do this automatically I need to copy the database from the server machine to my machine and then run the application as planned, but I keep getting an 'Access Denied' error when I try to copy the database.

Here's my code (very simple):

Public Sub CopyReports()
Dim ServerDatabase, LocalDatabase
ServerDatabase = "\\servermachinename\filedestination"
LocalDatabase = "C:\filedestination"
FileCopy ServerDatabase, LocalDatabase
End Sub

Please advise. Thanks in advance.
 
Have you verified that the directory you're trying to access is shared and that the share has appropriate permissions?

Josh
 
Continuing on that line of thought... with the database in an accessable share, it should be usable without copying.

When local machine opens "\\servermachinename\filedestination" it uses its copy of the associated application


Wil Mead
wmead@optonline.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top