title: Store the image into database in netbeans
body: <p>I am trying to store an image into db along with a string.i used the code given below</p>
  
  <pre><code> File image = new File("c:/a1.jpg");
   String d=jTextField1.getText();
  FileInputStream  fis 
   try {
          psmnt = con.prepareStatement("insert into c(name,pic) "+ "values(?,?)");
           psmnt.setString(1,d);
          fis = new FileInputStream(image);
           psmnt.setBinaryStream(2,fis,(int) (image.length()));
          psmnt.executeUpdate();
       }
  catch().....
  </code></pre>
  
  <p>I tried a lot.But still am getting  error " unimplemented or unreasonable conversion requested" .Can anyone help to solve this?pic is declared as blob datatype.Thank you.</p>