From: Lydie Soler <Lydie.Soler@inapg.inra.fr>
To: pgsql-jdbc@postgresql.org
Subject: Problem with getObjet
Date: Mon, 03 Apr 2006 11:16:14 +0100
Message-ID: <4430F5EE.9080106@inapg.inra.fr> (raw)
Hello,
I have the following code:
try
{
rs = stat.executeQuery(SQL);
}
catch (SQLException ex)
{
throw ex;
}
while (rs.next())
{
sim.addNoeud(rs.getObject(1), rs.getObject(2), rs.getByte(3));
}
where stat is a Statement, rs a ResultSet and SQL my SQL query.
My problem is that the rs.getObject commands return null. But if I use
rs.getString() it returns the correct value (ie a string that is not
null)...
I am wondering if this means that I can't use the getObject to get a
String ??? I used to do it with Oracle database....
The program used to work with Oracle, so I need to know the changes I
have to do to make it work under Postgres.
Thanks for your help.
--
Soler Lydie
Département Mathématiques et Informatique appliquées
Unité Mét@risk
16, rue Claude Bernard
75 231 PARIS Cédex 05
tel: (+33) 1 44 08 18 89
Fax : 01.44.08.72.76
E-mail: Lydie.Soler@inapg.inra.fr
http://metarisk.inapg.inra.fr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: Lydie.Soler@inapg.inra.fr
Subject: Re: Problem with getObjet
In-Reply-To: <4430F5EE.9080106@inapg.inra.fr>
References: <4430F5EE.9080106@inapg.inra.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox