Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

showing Open with dialogue  RSS feed

 
Mohamad Norouzi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
How can I read a blob field from database and show it with associated program and if there is no associated program show the "open with.." dialogue and user select which program he wants to read that file.

thanks so much
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36463
464
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohammad,
Forgetting about Java for a second, how would you know what file format the data is in? A blob is just some binary data.

You need to start by figuring out a way to know the file type or extension. You could store it in the database in another field. Or if it is always a certain type, you could use that knowledge.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!