I am storing the image and other details of visitor into table tbl_visitor. The code is as follows,
String string_op="F:\\POSTERS\\Roses\\TROPIC4.png";
File imageFile = new File(string_op);
FileInputStream fis = new FileInputStream(imageFile);
String queryVis="insert into tbl_visitor(visitor_name,contact_no," +
"job_profile,org_name,photo_id_proof,type_of_visitor,date," +
"extra_people,image) values('"+
name_of_visitor.getText()+"','"+
contact_num.getText()+"','"+
job_profile.getText()+"','"+
org.getText()+"','"+
photo_id_num.getText()+"','"+
type_of_visitor.getSelectedItem().toString()+"','"+
date_and_time.getText()+"','"+
tf1.getText()+"','"+
"fis,(int)imageFile.length()"+"')";
now I want to display the image on JFrame and to display the image am using the JLabel but I am unable to assign image to the JLabel. I have tried following code for display the image, but its giving me error.
Blob image_vis = rs1.getBlob(10);
image_cap.setIcon(image_vis);
Please help me.