aspose file tools*
The moose likes JDBC and the fly likes get files from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "get files from database" Watch "get files from database" New topic
Author

get files from database

Bobes Calin
Greenhorn

Joined: Nov 13, 2008
Posts: 14
Hello! I want to make a litle backup tool in java.I made a sample java class that stores files in mysql database:


The save_files table look like this:


i can put files in the database.

The problem is how can i get the files out from the database? did i made a good choice to store the files into a database?

Thakyou, Calin
Dragan Jovanovic
Greenhorn

Joined: Feb 07, 2008
Posts: 15
Of course you can read it.
Just make a select statement, retrieve it to ResultSet object, and you can access that blob with ResultSet.getBytes() method. It returns byte[].
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get files from database