How do you get multiple resultset from a single CallableStatement?

'Retrieving Multiple ResultSet Objects' tutorial was cited in a StackOverflow forum post in 2013.

The Retrieving Multiple ResultSet Objects tutorial was cited in a StackOverflow forum post in 2013.

Subject: How do you get multiple resultset from a single 
   CallableStatement?
Date: Nov 27, 2013
Author: James
Source: http://stackoverflow.com/questions/20254115/how-do-you-get-
   multiple-resultset-from-a-single-callablestatement

When I call the stored proc from command line I get the following. 
CALL `events`.`get_event_by_id`(10)

+---------+----------+-------------+---------------------+--------...
| evet_id | name     | description | starttime           | endtime...
+---------+----------+-------------+---------------------+--------...
|      10 | samole 3 | sanely      | 2013-11-27 17:37:00 | 2013-11...
+---------+----------+-------------+---------------------+--------...
1 row in set (0.00 sec)
...

Here is a snippet of my Java Code

String SP_GET_EVENT_BY_ID = "CALL `events`.`get_event_by_id`(?)";
String PROC_PARAM_EVENT_ID = "evet_id";
mCallableStatement = mConnection.prepareCall(SP_GET_EVENT_BY_ID);
mCallableStatement.setInt(10, PROC_PARAM_EVENT_ID);

When I execute the statement, only the event_table results are 
returned. I read the query with the following:

ResultSet reader = mCallableStatement.executeQuery();

while(reader.next())
{
   //etc..... here i assign db values to properties. 
}

I am trying to avoid making multiple request to the database because 
it's extremely slow (300 ms depending on on how many results)

Is it even possible?

...

I found this great article. http://www.herongyang.com/JDBC/MySQL-
CallableStatement-Multiple-ResulSet.html

Here is the code from that article. 
...

Table of Contents

 About This Book

 Reference Citations in 2017

 Reference Citations in 2016

 Reference Citations in 2015

 Reference Citations in 2014

Reference Citations in 2013

 (Android) Getting Current Date and Time

 Deatil View with other language

 Ordering and Installing SSL

 JDK (JBoss/Tomcat) SSL Issue

 Web-palveluiden koostaminen: web- ja RESTful-palvelut

 Corso di Architetture Orientate ai Servizi

 Hardening a SAS Installation on a multi tier installation on Linux

 [scala-user] for-loops still not optimized in 2.10?

 .bin/.cue - the purpose of .cue?

 (horror movie) com.hellogood.eCalendar

 Using keytool to convert bks file to p12

 Error while using LWP::Socket to send XML Data

 jdk 1.7 keytool doesn't save

 Distributed Key System Broken Up Over Multiple Nodes

 Upgrading to a Mantis UTF8

 Cant receive MMS with wifi turned on

 Including and using the MySql.Data.dll on your web host server

 Spring Download (in Korean)

 Android Data Storage Folders

 Distributed Key Systems: Enhancing Security...

 WP Spreadplugin Basket not shown

How do you get multiple resultset from a single CallableStatement?

 Blowfish Cipher Algorithm in Java

 Harmonics Systems for Time Mining

 Reference Citations in 2012

 Reference Citations in 2011

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

 Reference Citations in 2004

 Reference Citations in 2003

 PDF Printing Version