agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] Missing JDBC Features - part II
Date: Tue, 10 Oct 2006 23:17:08 -0400
Message-ID: <C2B37048-01A3-4C2B-B30C-9FEAEE86B0EB@mac.com> (raw)
Sorry guys,
I took a look at SPI_prepare to see that prepareStatement does not
return the data types for the parameters, rather, it expects them.
So I guess that a call to getParameterType(index) before the
parameter is set would return the default (java.sql.Types.VARCHAR).
Sorry for jumping the gun.
However, I have a new question. When I do a
Integer x = null;
_prepared.setObject(1, x, java.sql.Types.INTEGER);
A
java.sql.SQLException: Can't assign null unless the SQL type is known
at org.postgresql.pljava.jdbc.SPIPreparedStatement.setObject
(SPIPreparedStatement.java:230)
is thrown. The problem that I'm having is that the exception is
thrown at SPIPreparedStatement.setObject(int columnIndex, Object
value) and not at SPIPreparedStatement.setObject(int columnIndex,
Object value, int sqlType), which is what I think I'm calling.
setObject(int, Object, int) doesn't call setObject(int, Object).
Thoughts?
OS X 10.4.9, Pgsql 8.1.3, PL/Java 1.3
Jeff
Message-ID: <C2B37048-01A3-4C2B-B30C-9FEAEE86B0EB@mac.com>
Permalink: ../C2B37048-01A3-4C2B-B30C-9FEAEE86B0EB@mac.com/
Also on: postgresql.org/message-id/C2B37048-01A3-4C2B-B30C-9FEAEE86B0EB@mac.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] Missing JDBC Features - part II
In-Reply-To: <C2B37048-01A3-4C2B-B30C-9FEAEE86B0EB@mac.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox