Re: [h2] Re: Inserting text into a blob in H2

2019-10-09 Thread Philip Roc
I've found a solution INSERT INTO XXX ( ... "JSON_FILE" , ... ) VALUES ( ... FILE_READ('classpath:/j1.json') , ... ) ; See https://stackoverflow.com/questions/38353487/insert-blob-from-a-file-into-a-sql-script-to-embed-h2-database Le mercredi 9 octobre 2019 10:25:38

Re: [h2] Re: Inserting text into a blob in H2

2019-10-09 Thread Philip Roc
Hi Eyvgenij, here's the situation. My colleagues and I are currently working on a Spring Boot project that uses Oracle. However, although one of the developers has managed to install Oracle 11 on his machine, the 4 others haven't, probably because of company-wide security policies (who knows).

Re: [h2] Re: Inserting text into a blob in H2

2019-10-08 Thread Evgenij Ryazanov
BLOB or CLOB values in in-memory database? Bad idea in general, when you use an in-memory database, it should be small enough. If you want to connect to the database from another process, you need to start a TCP Server inside of the process that owns the database. org.h2.tools.Server tcp =

Re: [h2] Re: Inserting text into a blob in H2

2019-10-08 Thread Philippe de Rochambeau
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 a écrit :

[h2] Re: Inserting text into a blob in H2

2019-10-08 Thread Evgenij Ryazanov
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