Re: Handling null values in char fields from JDBC

Поиск
Список
Период
Сортировка
От Sean Duffy
Тема Re: Handling null values in char fields from JDBC
Дата
Msg-id 20020122183419.35472.qmail@mail.com
обсуждение исходный текст
Ответ на Handling null values in char fields from JDBC  ("Sean Duffy" <sean.duffy@programmer.net>)
Ответы Re: Handling null values in char fields from JDBC
Список pgsql-jdbc
-----Original Message-----
From: "Paulo Merson" <paulo@summa-tech.com>
Date: Tue, 22 Jan 2002 09:46:44 -0500
To:  <pgsql-jdbc@postgresql.org>
Subject: Re: [JDBC] Handling null values in char fields from JDBC

Paulo -

I am using ResultSet.getString but Im not
sure how I can use ResultSet.wasNull.  Is
there an example I could look at?

Thanks :)

Sean -

> Are you using ResultSet.getString and then ResultSet.wasNull?
>
> Paulo Merson
> Summa Technologies - www.summa-tech.com
>
> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Sean Duffy
> Sent: Tuesday, January 22, 2002 9:22 AM
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] Handling null values in char fields from 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 question is 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 and setting all null
> values to '')?
>
> I have looked thru two different Postgresql manuals but have not been
> able to find anything referring to null value handling at 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=htt
> p://www.getpennytalk.com
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--

_______________________________________________
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 по дате отправления:

Предыдущее
От: "Dave Cramer"
Дата:
Сообщение: Re: Handling null values in char fields from JDBC
Следующее
От: "Sean Duffy"
Дата:
Сообщение: Re: Handling null values in char fields from JDBC