From derby-user-return-117-apmail-db-derby-user-archive=db.apache.org@db.apache.org Sun Oct 03 01:34:21 2004 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 61751 invoked from network); 3 Oct 2004 01:34:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Oct 2004 01:34:21 -0000 Received: (qmail 59334 invoked by uid 500); 3 Oct 2004 01:34:20 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 59311 invoked by uid 500); 3 Oct 2004 01:34:20 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 59299 invoked by uid 99); 3 Oct 2004 01:34:19 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [66.235.180.72] (HELO sls-dc1p2.dca2.superb.net) (66.235.180.72) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 02 Oct 2004 18:34:18 -0700 Received: from [192.168.37.166] (adsl-209-233-18-245.dsl.snfc21.pacbell.net [209.233.18.245]) (authenticated bits=0) by sls-dc1p2.dca2.superb.net (8.12.10/8.12.10) with ESMTP id i931e56I022684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 2 Oct 2004 18:40:07 -0700 Message-ID: <415F5715.5070905@gluecode.com> Date: Sat, 02 Oct 2004 18:34:13 -0700 From: Jeremy Boynes User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: derby-user@db.apache.org Subject: How to return null param from a stored procedure? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I have a stored procedure where I want to return a null value from one its parameters - something like: public static void Int_Proc2(Integer[] param) { param[0] = null; } I am declaring this to Derby as: CREATE PROCEDURE Int_Proc2(OUT param INTEGER) PARAMETER STYLE JAVA LANGUAGE JAVA READS SQL DATA EXTERNAL NAME 'test.jdbc.CallableStatementTest.Int_Proc2' but a prepareCall("{call Int_Proc2(?)}"); throws a 42X50 SQLException (no method found ...) Using a primitive int works fine but obviously I can't return null that way. How should I be doing this? Thanks -- Jeremy