wood burning stoves 2.0*
The moose likes Java in General and the fly likes Download .mdb File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Download .mdb File" Watch "Download .mdb File" New topic
Author

Download .mdb File

Chris Morrell
Greenhorn

Joined: Aug 10, 2005
Posts: 11
Hello. Can anyone tell me if it's possible to use java to download an .mdb file? What I'm trying to do specifically is automate a very tedious routine that includes downloading an Access database from my company's web host, making some modifications and then uploading the database back to where I got it. I need help with the uploading and downloading part. If it's possible, can anyone give me some pointers or point me in the right direction? Thank you.
Manuel Moons
Ranch Hand

Joined: Mar 05, 2002
Posts: 229
Why don't you make a web interface that accesses the database. Don't you think that might be more interesting.

But to answer you question:
You can download a file using the URL class. Just create an URL object that refers the file. Then call the openStream() method and read the inputstream. You should write that stream to your filesystem.

To upload a file you can use the HttpClient package in the Apache Jakarta commons project on the client side. You can use the HttpUpload package on the server side.

I'm not sure how you can edit the db on the client side though. Maybe you can use a JDBC DBC bridge for that.

Very short answer to a more complex solution.

Jakarta commons project
[ August 10, 2005: Message edited by: Manuel Moons ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Download .mdb File
 
Similar Threads
downloading files from database
FTP using servlet
java.lang.IllegalStateException: getOutputStream() error
XLS File download from server
file uploading and downloading through JSP