You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by baiguai <ce...@hotmail.com> on 2007/08/09 18:57:15 UTC

Using Functions to Return ResultSets

I have done a search on this, but didn't see anything - if I have overlooked
a post, my apologies.

I am trying to create a reusable function that would allow me to send in a
derby query, and get a resultset back. This way I can cut down on a ton of
redundant code, but when I try to send the resultset back I get errors
because the connection is no longer open since it has left the function.

Is there a way to pass along a resultset without the need of creating
complex arrays or other tedious means of passing the data along?

Btw, I am very new to Java, so this may most likely be my lack of knowledge
in the language as opposed to a Derby thing. I work in C# for a living so I
am comfortable in Java, but am by no means savvy.


Thank you very much!!
-- 
View this message in context: http://www.nabble.com/Using-Functions-to-Return-ResultSets-tf4243819.html#a12076304
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Using Functions to Return ResultSets

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I am trying to create a reusable function that would allow me to send in a
> derby query, and get a resultset back. 

http://wiki.apache.org/db-derby/DerbySQLroutines

Look for the section titled "Returning java.sql.ResultSets from Java procedures"

thanks,

bryan