Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying Image from database on to the screen  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one solve my problem regarding displaying image on the screen.
I have stored my image in SQL database as data type called "image" format.
I am trying to get the binary data and display on the screen using jsp. It gives me the error
Here is the code that i am using
CallableStatement stmtInsert= con.prepareCall( " { call spSM_Image }");
ResultSet rs = stmtInsert.executeQuery();


if (
byte [] buf = rs.getBytes("photo");
ServletOutputStream op = response.getOutputStream();

for(int i=0;i<Integer.parseInt(dim_image);i++)
Pls. reply if some one can help this out

ashok pandey
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!