Re: null: was is the default returned value? - Mailing list pgsql-jdbc

From Toby
Subject Re: null: was is the default returned value?
Date
Msg-id 5.1.0.14.0.20021021090955.00a75010@mail.flirble.org
Whole thread Raw
In response to null: was is the default returned value?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List 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


pgsql-jdbc by date:

Previous
From: Antonie C Malan
Date:
Subject: Trouble connecting
Next
From: "Michael Paesold"
Date:
Subject: Re: new String(byte[]) performance