Hi, thank you for your suggestions. Can the prepared statement be run from outside (a standalone Java program) the (Spring Boot) project that created an in-memory H2 database containing a table with a BLOB column, or must it run from inside?
> Le 9 oct. 2019 à 03:51, Evgenij Ryazanov <[email protected]> a écrit : > > > Hello. > > H2 is not different from others, JDBC has java.sql.Blob interface that should > be used, use Collection.createBlob() to allocate a BLOB instance, use one of > its methods to put your data into it, and use PreparedStatement.setBlob() to > pass this BLOB to the command. There are also an alternative > PreparedStatement.setBlob() methods that take a java.io.InputStream as a > parameter. If you data is small enough, you can use the byte[] with > PreparedStatement.setBytes(). > > If you can build H2 from its current sources, you can use the JSON data type > instead of BLOB, but it is not designed for really large JSON documents. If > you need to store large JSON data in H2, please let us know. > -- > You received this message because you are subscribed to the Google Groups "H2 > Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/h2-database/6a8a057f-e96b-4e83-8025-0a632aae4243%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/78704D9A-A9A5-4EE0-9DC6-3772E6D1F06E%40free.fr.
