On 9 Apr, 18:42, Thomas Mueller <[email protected]> wrote:
> Hi,
>
> See alsohttp://www.h2database.com/html/functions.html#file_read
>
> Regards,
> Thomas

I tried that like so:
INSERT INTO mytable (id,name,file) VALUES(1,'file.xml',FILE_READ('/my/
local/path/file.xml'));

The sql script then seems to run (i.e. to errors or warnings) but
then, when I try to visualise the table (via the H2 front-end) and do
a
SELECT * FROM mytable
I get a:
Java heap space
java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2882)
    at java.lang.StringValue.from(StringValue.java:24)
    at java.lang.String.<init>(String.java:178)
    at org.h2.util.ByteUtils.convertBytesToString(ByteUtils.java:154)
    at org.h2.util.ByteUtils.convertBytesToString(ByteUtils.java:136)
    at org.h2.value.ValueLob.getString(ValueLob.java:563)
    at org.h2.jdbc.JdbcResultSet.getString(JdbcResultSet.java:266)
    at org.h2.server.web.WebThread.escapeData(WebThread.java:2032)
    at org.h2.server.web.WebThread.getResultSet(WebThread.java:1956)
    at org.h2.server.web.WebThread.getResult(WebThread.java:1710)
    at org.h2.server.web.WebThread.query(WebThread.java:1274)
    at org.h2.server.web.WebThread.process(WebThread.java:430)
    at org.h2.server.web.WebThread.processRequest(WebThread.java:183)
    at org.h2.server.web.WebThread.process(WebThread.java:236)
    at org.h2.server.web.WebThread.run(WebThread.java:193)

the file is relatively big 11MB but I wouldn't think this it too
much... (the rest of the db being empty)

-- 
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