Thread: setObject(col, blob) throws PSQLException

setObject(col, blob) throws PSQLException

From
Marc Herbert
Date:
So does setObject(col, blob, Types.Blob).

Whereas setBlob(col, blob) works fine in the same test case.

This case is like missing in the big switch found in the code.
Is this on purpose?

Re: setObject(col, blob) throws PSQLException

From
Kris Jurka
Date:

On Thu, 29 Sep 2005, Marc Herbert wrote:

> So does setObject(col, blob, Types.Blob).
>
> Whereas setBlob(col, blob) works fine in the same test case.
>
> This case is like missing in the big switch found in the code.
> Is this on purpose?

No, that's an oversight which I'll fix.  Perhaps we were concerned about
trying to do a conversion for something like setObject(col, "string data",
Types.BLOB)?

Kris Jurka


Re: setObject(col, blob) throws PSQLException

From
Kris Jurka
Date:

On Thu, 29 Sep 2005, Marc Herbert wrote:

> [setObject(col, blob, Types.Blob) throw Exception]
>

I've commited a fix to cvs for both the 8.0 and 8.1 branches.  Types.CLOB
and Types.ARRAY also suffered the same problem.

Kris Jurka

Re: setObject(col, blob) throws PSQLException

From
Marc Herbert
Date:
Kris Jurka <books@ejurka.com> writes:

> On Thu, 29 Sep 2005, Marc Herbert wrote:
>
>> [setObject(col, blob, Types.Blob) throw Exception]
>>
>
> I've commited a fix to cvs for both the 8.0 and 8.1 branches.
> Types.CLOB and Types.ARRAY also suffered the same problem.
>

I just had a look at it (did not try it yet) and it seems you fixed:

  setObject(int parameterIndex, Object x)

But not:

  setObject(int parameterIndex, Object x, int targetSqlType)


Am I missing something ? (besides an actual test :-/






Re: setObject(col, blob) throws PSQLException

From
Kris Jurka
Date:

On Mon, 3 Oct 2005, Marc Herbert wrote:

> I just had a look at it (did not try it yet) and it seems you fixed:
>
>  setObject(int parameterIndex, Object x)
>
> But not:
>
>  setObject(int parameterIndex, Object x, int targetSqlType)
>

Actually I did it the other way around, I fixed setObject(int, Object,
int), but not setObject(int, Object).  I've fixed this now as well.

Kris Jurka