ImageIcon in Database
Hi,
I am trying to store an ImageIcon in a database:
inserting the Icon works fine using this code:
(rs is a ResultSet)
rs.updateObject("PICTURE",new ImageIcon("D:/test.jpg"));
rs.insertRow();
when I try to retrieve the icon using:
ImageIcon icon = ((ImageIcon) rs.getObject("PICTURE"));
I get a ClassCastException:
java.lang.ClassCastException: [B cannot be cast to javax.swing.ImageIcon
Is this a problem with my code, or could this be a jdbc Driver problem?
I am using the relatively new H2 Database (http://www.h2database.com/html/frame.html)
Thanks
Bjoern

