db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@sbcglobal.net>
Subject Re: setNull() using Types.VARCHAR for a CLOB parameter fails in embedded mode.
Date Fri, 14 Oct 2005 00:55:56 GMT
Army wrote:

 > If I attempt to call PreparedStatement.setNull() and specify
 > Types.VARCHAR when the actual parameter type (as determined at bind
 > time) is CLOB, Derby in embedded mode will throw an error, while Derby
 > in client/server mode will succeed.

[ snip ]

Looks like the problem is in iapi.types.DataTypeDescriptor:

	private static boolean isCharacterType(int jdbcType) {

		switch (jdbcType) {
		case Types.CHAR:
		case Types.VARCHAR:
		case Types.LONGVARCHAR:
			return true;
			return false;

I think CLOB should be included in this list, too, shouldn't it?  In 
iapi.types.TypeId, "isStringTypeId" is true for CLOBs as well as the other 
character types, so it seems like the above method should have similar logic. 
Unless CLOB was intentionally left off for some reason...?

In any event, my original intent stands: if I hear no objections, I'll file a 
Jira bug tomorrow.


View raw message