X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 56D5652982 for ; Wed, 20 Jul 2005 04:00:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91908-07 for ; Wed, 20 Jul 2005 07:00:36 +0000 (GMT) Received: from hotmail.com (bay13-f22.bay13.hotmail.com [64.4.31.22]) by svr1.postgresql.org (Postfix) with ESMTP id A7A6E529B5 for ; Wed, 20 Jul 2005 04:00:35 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 20 Jul 2005 00:00:34 -0700 Message-ID: Received: from 202.108.130.138 by by13fd.bay13.hotmail.msn.com with HTTP; Wed, 20 Jul 2005 07:00:34 GMT X-Originating-IP: [202.108.130.138] X-Originating-Email: [zolawu@hotmail.com] X-Sender: zolawu@hotmail.com From: "wu xiao" To: pgsql-jdbc@postgresql.org Subject: a question, please help me. Date: Wed, 20 Jul 2005 07:00:34 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed X-OriginalArrivalTime: 20 Jul 2005 07:00:34.0758 (UTC) FILETIME=[B9D6FE60:01C58CF8] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.553 tagged_above=0 required=5 tests=DEAR_SOMETHING, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, MSGID_FROM_MTA_HEADER X-Spam-Level: ** X-Archive-Number: 200507/176 X-Sequence-Number: 13324 Dear Sir or Madam, I am in trouble when I try to connect postgresql 8.03 to JBuilder9 with JDBC3 8.1. When I use no-parameter sql, my project runs well. For example, Connection db = DriverManager.getConnection(url,user,pwd); Statement st = db.createStatement(); ResultSet rs = st.executeQuery("select * from operator"); while(rs.next()) { System.out.println("ID: "+rs.getString(1)); } rs.close(); st.close(); The results are: ID: 100 ID: 101 ... But when I try to use parameter sql, my project has sqlexceptions, for example: Connection db = DriverManager.getConnection(url,user,pwd); PreparedStatement ps = db.prepareStatement("select * from operator where ID=?"); ps.setString(1,100); ResultSet rs = ps.executeQuery(); if(rs!=null) { while(rs.next()) { System.out.println("ID: "+rs.getString(1)); } rs.close(); } ps.close(); The sqlexception is:....column 'id' is not exist..... What's the reason please? All of the tables are created in Windows XP. Thank you for your any suggestion. Sincerely, Thomas Wu _________________________________________________________________ 享用世界上最大的电子邮件系统— MSN Hotmail。 http://www.hotmail.com