Still did not find solution. Theres method

    /**
     * Create a blob value from this input stream.
     *
     * @param x the input stream
     * @param length the length (if smaller or equal to 0, all data
until the
     *            end of file is read)
     * @return the value
     */
    Value createBlob(InputStream x, long length) throws SQLException {
        if (x == null) {
            return ValueNull.INSTANCE;
        }
        if (length <= 0) {
            length = -1;
        }
        Value v = ValueLob.createBlob(x, length, session.getDataHandler
());
        return v;
    }

but its private and it does not return JDBC Blob object but some H2
internal. :-(

Any advice will help. Thanks

On 4 Bře, 16:01, Lukas Zapletal <[email protected]> wrote:
> Hello,
>
> I need to do something like this:
>
>           Blob blob = dbConnection.createBlob();
>           blob.setBytes(1, buffer);
>
>           // put it into an object and insert into database using DAO
>
> Since I am using higher level database approchach (not just plain JDBC
> where I could use setBinaryContent or something like that) I need to
> work with blob directly.
>
> Methods setBytes and setBinaryStream are not supported (H2 throws
> Unsupported Exception). How can I use Blob? Is it even possible?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
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