X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id ED1D4D1EF8E for ; Mon, 3 May 2004 18:57:03 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 63752-03 for ; Mon, 3 May 2004 18:56:49 -0300 (ADT) Received: from web13704.mail.yahoo.com (web13704.mail.yahoo.com [216.136.175.137]) by svr1.postgresql.org (Postfix) with SMTP id 76F42D1EFB9 for ; Mon, 3 May 2004 18:56:42 -0300 (ADT) Message-ID: <20040503215650.7289.qmail@web13704.mail.yahoo.com> Received: from [208.161.98.140] by web13704.mail.yahoo.com via HTTP; Mon, 03 May 2004 14:56:50 PDT Date: Mon, 3 May 2004 14:56:50 -0700 (PDT) From: todd runstein Subject: calling function with String resolves as "Unknown" instead of varchar To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/2 X-Sequence-Number: 10012 I'm calling a function with the following signature: create or replace function usp_affectedproduct(integer, integer, varchar) RETURNS int as ... I'm calling the function with something similar to: String query = "{? = call usp_affectedproducts(?, ?, ?)}"; Connection conn = null; CallableStatement s = null; try { conn = getConnection(datasource); s = conn.prepareCall(query); s.registerOutParameter(1,Types.INTEGER); s.setInt(2,qualityid); s.setInt(3,submitid); s.setString(4,products[x].getName()); s.execute(); } catch (SQLException e) { throw e; }finally{ When I run this, I get an SQLException stating: function usp_affectedproducts(integer, integer, "unknown") does not exist I've also try s.setObject(4, aString, Types.VARCHAR), also to no avail. I've tried using a PreparedStatement instead of the CallableStatement - again, without success. Any ideas? I'm running 7.4.1 on RedHat 8.0 with JDK 1.4.1_01. Thanks in advance ===== The only "dumb question" is the one you were too afraid to ask. ________________________________________ Check out RouteRuler - Free software for runners, cyclists, walkers, etc. http://routeruler.sourceforge.net ________________________________________ __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover