Yes thanks but I cannot use this with DAO pattern.

Nevermind I will use Hibernate then.

LZ

On 4 Bře, 19:03, Thomas Kellerer <[email protected]>
wrote:
> > > Methods setBytes and setBinaryStream are not supported (H2 throws
> > > Unsupported Exception). How can I use Blob? Is it even possible?
>
> This works for me:
>
> PreparedStatement stmt = connection.prepareStatement("INSERT INTO
> blob_table (blob_column) VALUES (?)";
> InputStream blobData = new FileInputStream(new File("image.jpg"));
> stmt.setBinaryStream(1, blobData);
> stmt.executeUpdate();
>
> It works the same when using an UPDATE statement.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to