• Post Reply Bookmark Topic Watch Topic
  • New Topic

retrive image from sqlite to java eclipse  RSS feed

 
Hadijah Mohamad
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi.. i'm doing my final year project using java eclipse and sqlite as database. the problem is i cannot retrived image from database (blob) and displayed in my GUI. please help me.


 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Always use the code button. Since you are new, I have used the code button on the code for you, and doesn't it look better

I can see a major problem, I am afraid. You appear only to have one class. You should separate the retrieval from the database and the display into separate classes. Please write a class which loads the image from the database, and see how that works. If you can load and save the image, you have made a start.
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The other problem I see is that you don't have any code which attempts to read Blob data from a database. So the problem isn't that your code is wrong in some way which we could discuss, the problem is that you haven't written the code yet. And nobody here is going to write it for you. So don't despair, write some code and let's discuss it if you have problems with it.

 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:. . . you haven't written the code yet. . . . So don't despair, write some code and let's discuss it if you have problems with it.
Or even better, see if you can't copy some code. Look at this Tutorial. You will probably find some code there which you can copy with only slight changes
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!