X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id CBDB711F6782 for ; Mon, 3 Apr 2006 06:15:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 60010-02 for ; Mon, 3 Apr 2006 06:15:53 -0300 (ADT) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 420C211F6700 for ; Mon, 3 Apr 2006 06:15:52 -0300 (ADT) Received: from smtp.inapg.inra.fr (tamise.inapg.inra.fr [193.54.111.32]) by svr4.postgresql.org (Postfix) with ESMTP id BB0695AF08A for ; Mon, 3 Apr 2006 09:15:52 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by smtp.inapg.inra.fr (Postfix) with ESMTP id 6AA594C0B2 for ; Mon, 3 Apr 2006 11:15:50 +0200 (CEST) Received: from smtp.inapg.inra.fr ([127.0.0.1]) by localhost (smtp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00911-03 for ; Mon, 3 Apr 2006 11:15:48 +0200 (CEST) Received: from [10.75.2.21] (p1075221.inapg.fr [10.75.2.21]) by smtp.inapg.inra.fr (Postfix) with ESMTP id B345C4C0A0 for ; Mon, 3 Apr 2006 11:15:46 +0200 (CEST) Message-ID: <4430F5EE.9080106@inapg.inra.fr> Date: Mon, 03 Apr 2006 11:16:14 +0100 From: Lydie Soler Reply-To: Lydie.Soler@inapg.inra.fr User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Problem with getObjet Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at inapg.fr X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200604/20 X-Sequence-Number: 14954 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