aspose file tools*
The moose likes Android and the fly likes Storing image in the database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Storing image in the database" Watch "Storing image in the database" New topic
Author

Storing image in the database

chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629



Not able to store image in the database ?


http://www.androcid.com/
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9317
    
  17

Generally its not recommended to store files in Android database. To do that, you can include a column of type _data in your database table, android in that case will store the file in a separate location and store the reference to the file in the database. This process is mostly automatic. Look at this


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

But I am able to store the byte array in the database.
Can I read it back and convert it to Image ?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9317
    
  17

In your previous post you wrote you are not able to store the image in the database and now you are saying you are able to store it in the database?? Your code doesn't have anything related to reading the image. If you are having problems reading the file back, then show us the code which reads the file from the database...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Storing image in the database