| From: | Lydie Soler <Lydie(dot)Soler(at)inapg(dot)inra(dot)fr> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Problem with getObjet |
| Date: | 2006-04-03 10:16:14 |
| Message-ID: | 4430F5EE.9080106@inapg.inra.fr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
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(at)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(dot)Soler(at)inapg(dot)inra(dot)fr
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christopher Condit | 2006-04-03 20:36:52 | psql COPY with JDBC |
| Previous Message | João Paulo Ribeiro | 2006-04-03 09:24:06 | Re: Behaviour of setAutoCommit may not be completely correct. |