Skip site navigation (1) Skip section navigation (2)

JDBC setObject(n,obj) throws exception when obj is null

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: JDBC setObject(n,obj) throws exception when obj is null
Date: 2001-04-17 11:40:02
Message-ID: 200104171140.f3HBe2x27289@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Dave Cramer (Dave(at)micro-automation(dot)net) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
JDBC setObject(n,obj) throws exception when obj is null

Long Description
The jdbc call setObject(n,obj) does not set the column to null if the object is null and the object is of type Object.

One easy solution to this problem is to simply check for null at the top of the setObject method, and call setNull(n,Types.Other)



Sample Code


No file was uploaded with this report


pgsql-bugs by date

Next:From: Peter T MountDate: 2001-04-17 13:19:37
Subject: Re: Major Memory Leak in PostgreSQL JDBC Driver
Previous:From: Christine KlukaDate: 2001-04-17 10:28:11
Subject: Postgres Installation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group