JavaRanch » Java Forums »
Databases »
JDBC
| Author |
1312 - PROCEDURE logininformation.yearly can't return a result set in the given context
|
Arunkumar Chinnadurai
Ranch Hand
Joined: Dec 15, 2011
Posts: 53
|
|
Hai all,
I have created and executed a procedure in following version of WAMP SERVER
MySQL
Server: localhost (localhost via TCP/IP)
Server version: 5.5.8-log
Protocol version: 10
User: root@localhost
MySQL charset: UTF-8 Unicode (utf8)
Web server
Apache/2.2.17 (Win32) PHP/5.3.5
MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
PHP extension: mysqli
I tried to execute following version
MySQL
Server: Localhost via UNIX socket
Server version: 5.0.22
Protocol version: 10
User: logininformation@localhost
MySQL charset: UTF-8 Unicode (utf8)
Web server
Apache/2.2.3 (Red Hat)
MySQL client version: 5.1.30
PHP extension: mysql
My Procedure is
It raising following error
|
 |
Wendy Gibbons
Bartender
Joined: Oct 21, 2008
Posts: 1098
|
|
Sorry your method returns far to much code for me to have time to read, so i checked out your error message and found it means this:
from the mysql manual:
Statements that return a result set can be used within a stored procedure but not within a stored function. This prohibition includes SELECT statements that do not have an INTO var_list clause and other statements such as SHOW, EXPLAIN, and CHECK TABLE. For statements that can be determined at function definition time to return a result set, a Not allowed to return a result set from a function error occurs (ER_SP_NO_RETSET). For statements that can be determined only at runtime to return a result set, a PROCEDURE %s can't return a result set in the given context error occurs (ER_SP_BADSELECT).
|
 |
Wendy Gibbons
Bartender
Joined: Oct 21, 2008
Posts: 1098
|
|
|
i have found about a flag called CLIENT_MULTI_RESULTS are you setting this?
|
 |
 |
|
|
subject: 1312 - PROCEDURE logininformation.yearly can't return a result set in the given context
|
|
|
|