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.
posted 10 years ago
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.