null: was is the default returned value?

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: null: was is the default returned value?
Date: 2002-10-21 05:49:02
Message-ID: 3DB3954E.5070304@mega-bucks.co.jp
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've been having some trouble using getObject() and getStr() on
ResultSets that contain null values for some fields.

If I do Object o = r.getObject("col") and the returned value is null I
get a nullPointeException. But for String s = r.getStr("col") I get a
value that prints out as "null" ... so if getStr() works I don't
understand why getObject() doesn't ...

Thanks,

Jc

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Antonie C Malan 2002-10-21 06:20:28 Trouble connecting
Previous Message Aaron Mulder 2002-10-21 03:50:59 Re: new String(byte[]) performance