Handling null values in char fields from JDBC - Mailing list pgsql-jdbc

From Sean Duffy
Subject Handling null values in char fields from JDBC
Date
Msg-id 20020122142142.4536.qmail@mail.com
Whole thread Raw
Responses Re: Handling null values in char fields from JDBC  ("Paulo Merson" <paulo@summa-tech.com>)
Re: Handling null values in char fields from JDBC  ("Dave Cramer" <Dave@micro-automation.net>)
List pgsql-jdbc
I am running Postgresql 7.1.3 and using the 7.1-1.2 jar jdbc driver.  I noticed that when I used a
ResultSet.getString("charfield")call to fetch null data from the char field I get a null pointer exception error.  My
questionis two fold.. 
1) Is this normal behavior for the jdbc driver?
2) Is there a recommended way of trapping for a null value in a char field (besides just going into the db with psql
andsetting all null values to '')? 

I have looked thru two different Postgresql manuals but have not been able to find anything referring to null value
handlingat the jdbc level.   

If anyone can pt me in the right direction I
would really appreciate it.

Thanks!
--

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


1 cent a minute calls anywhere in the U.S.!

http://www.getpennytalk.com/cgi-bin/adforward.cgi?p_key=RG9853KJ&url=http://www.getpennytalk.com



pgsql-jdbc by date:

Previous
From: "Dave Cramer"
Date:
Subject: Re: error calling function - jdbc driver limitation?
Next
From: "Paulo Merson"
Date:
Subject: Re: Handling null values in char fields from JDBC