I had a similar problem, i used a binary stream to load the images at the database, 
like:

PreparedStatement prepStmt = null;
  | try {
  |     
  |     makeConnection();
  |     String strInsertSQL = "INSERT INTO TABLEBLO (BLOINTNUM,BLO__FILE) VALUES 
(?,?)";
  |     prepStmt = con.prepareStatement(strInsertSQL);
  |     
  |     strIdentifier = getId();  // Getting new id
  |     prepStmt.setString(1,strIdentifier);    
  |     
  |     ByteArrayInputStream bais = new ByteArrayInputStream(arrayArchivo);
  |     prepStmt.setBinaryStream(2, bais,arrayArchivo.length);
  |     prepStmt.executeUpdate();
  |      
  |     bais = null; strInsertSQL = null;
  | 
  | } catch (Exception e) { <whatever> );
  | } finally { 
  |     prepStmt.close();
  |     closeConnection();
  | }

I hope this helps you

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841066#3841066

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841066


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to