returning resultset from stored procedure to java client
Posted by: caesar smith
Date: May 14, 2008 09:34PM

I have a following stored procedure executing a select statement containing "limit" keyword. I figured out how to passing a dynamic value to "limit" clause, but I don't know how to return the result set to the java client. When I try to read data from result set, it doesn't return anything. But it returns result set if i try just "select * from folders". Does anybody know how to do this?

Thanks.


CREATE PROCEDURE sp_get_foldernames
(in_folder_name varchar(30), in_user_id int, in_start_pos NUMERIC, in_limit_pos NUMERIC)
BEGIN

DECLARE starting_pos NUMERIC;
DECLARE limit_pos NUMERIC;

SET starting_pos = in_start_pos;
SET limit_pos = in_limit_pos;

PREPARE STMT FROM "select * from folders where f_name = ? and user_id = ? LIMIT ?, ?";

EXECUTE STMT USING @in_user_id, @in_folder_name, @starting_pos ,@limit_pos;
END $$

Options: ReplyQuote


Subject
Written By
Posted
returning resultset from stored procedure to java client
May 14, 2008 09:34PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.