Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 653DCD281 for ; Tue, 16 Oct 2012 18:45:03 +0000 (UTC) Received: (qmail 96727 invoked by uid 500); 16 Oct 2012 18:45:03 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 96635 invoked by uid 500); 16 Oct 2012 18:45:03 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 96626 invoked by uid 99); 16 Oct 2012 18:45:03 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2012 18:45:03 +0000 Date: Tue, 16 Oct 2012 18:45:03 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: <583448418.52928.1350413103193.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (DERBY-2927) Procedures can't return values other than ResultSets MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477255#comment-13477255 ] Rick Hillegas commented on DERBY-2927: -------------------------------------- Hi Dag, I'm confused. I haven't looked at the patch but I thought you were moving in the direction of implementing procedures which return values. Going back through the comments, I see that you may be attempting something more modest: using JDBC escape syntax to call a function. Perhaps that functionality belongs on a separate issue. It seems to me that what is being asked for on this issue is a way to bind a SQL routine to a static method which both returns a value and supports IN, OUT, and IN/OUT args. Thanks. > Procedures can't return values other than ResultSets > ---------------------------------------------------- > > Key: DERBY-2927 > URL: https://issues.apache.org/jira/browse/DERBY-2927 > Project: Derby > Issue Type: Improvement > Components: SQL > Affects Versions: 10.2.2.0 > Environment: Java 1.4.2 > Windows XP SP 2 > Reporter: Jacques Coetzee > Labels: derby_triage10_10 > Attachments: derby-2927-diag-2.diff, derby-2927-diag-2.stat, derby-2927-diag-3.diff, derby-2927-diag-3.stat, derby-2927-diag.diff, derby-2927-diag.stat > > > First off, this is not really a bug, it's more of a restriction. > > As per the needs of my inhouse framework I need a procedure to be able to return a value other than > a ResultSet (I need a integer). The reason I need to use a procedure; is because I'm using INOUT parameters. > > When call my procedure, it needs to look like this: > > { ? = call myProcedure(?,?,?,?,?,?)} > > Where the first ? represents a status-code, ie a failure = -1, and a successfull would be 1. > All the other procedure paramters are INOUT. > > If I where to use normal scripting methods in any other DB, for instance DB2 or Oracle > then I would be able to do this. It seems that the problem has to do with using > JAVA "Stored" Procedures. > > Is it possible to either make procedures return primitive types, OR > for Functions to be able to use OUT and INOUT paramters? > > I've got High Hopes for Derby, but it's issues like this that might just > sway me to use a different DB. > > I appreciate any feedback you can give me. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira