Re: null: was is the default returned value?

From: Toby <toby(at)paperjet(dot)com>
To: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: null: was is the default returned value?
Date: 2002-10-21 08:14:04
Message-ID: 5.1.0.14.0.20021021090955.00a75010@mail.flirble.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

>What value does the jdbc driver return from the various getXXX()
functions when the DB return value is null

i think this is undefined. what you need to do is first call your getXXX()
call and then follow up with a wasNull() call.

>But for String s = r.getStr("col") I get a value that prints out as "null"

if you tried doing the following, i think you'd see the same thing happening

String s;

System.out.println("s=" + s);

the printing of null isn't to do with the database, its to do with the
default behaviour of the String class, even though you have a null instance.

t

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Paesold 2002-10-21 08:44:59 Re: new String(byte[]) performance
Previous Message Antonie C Malan 2002-10-21 06:20:28 Trouble connecting