>"Dejan Vucinic" <[EMAIL PROTECTED]> writes:
> > I'm trying to create a BLOB with the 7.1.2 JDBC driver and both
> > setBytes() and setBinaryStream() fail with this message:
> >   FastPath call returned ERROR:  lo_write: invalid large obj descriptor 

>From: Tom Lane <[EMAIL PROTECTED]>
>Probably you are not wrapping the operation into a transaction
>(BEGIN/COMMIT).  Large object descriptors are only good to the end of
>the current transaction.

I believe I am, the code looks like this:

  insert = connection.prepareStatement(
             "INSERT INTO FOO (A, B) VALUES (?, ?)");
  insert.setString(1, somestring);
  insert.setBytes(2, byte[] xx);

The exception gets thrown out of setBytes, at the point where the
driver tries to close the stream that copied the bytes into the LOB,
and long before the SQL statement actually gets executed.

[Note that this is neither the first nor the last statement on that
connection, since connections get pooled by the app server; could
this be causing the problem?]



Get your FREE download of MSN Explorer at http://explorer.msn.com

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?


Reply via email to