Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Download .mdb File

 
Chris Morrell
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic