Bug #9292 SELECT in a stored procedure must have INTO
Submitted: 19 Mar 2005 7:03 Modified: 22 Mar 2005 3:27
Reporter: Shubha Rao Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version: OS:
Assigned to: Reggie Burnett CPU Architecture:Any

[19 Mar 2005 7:03] Shubha Rao
Description:
SELECT in a stored procedure must have INTO

How to repeat:
I have create MYSQL Procedure, it created successfully

CREATE PROCEDURE `infosearch`.`sp_info_QLink1`()
begin
   Select distinct PFC.* from pre_form_col1 PFC, Quest_Link WHERE PFC.rowid = Qlink1 ORDER BY 1;
end

Now, I am trying to invoke from asp.net 

try
{
OdbcConnection Conn=new OdbcConnection("DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=Infosearch;UID=root;PASSWORD=real;OPTION=3");
Conn.Open();
OdbcCommand cmd=new OdbcCommand("sp_info_QLink1",Conn);
cmd.CommandType=CommandType.StoredProcedure;
OdbcDataReader dr=cmd.ExecuteReader();
OdbcCommand cmd = new OdbcCommand("call sp_info_QLink1()",Conn);	
cmd.CommandType=CommandType.StoredProcedure;
OdbcDataReader dr=cmd.ExecuteReader();
}catch(Exception ee){ee=ee;}

				
It is raising the exception 'SELECT in a stored procedure must have INTO'
[22 Mar 2005 3:27] Reggie Burnett
We're sorry, but the bug system is not the appropriate forum for 
asking help on using MySQL products. Your problem is not the result 
of a bug.

Support on using our products is available both free in our forums
at http://forums.mysql.com and for a reasonable fee direct from our
skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.

Additional info:

This bug list is for bugs reported against the Connector/Net product.  Please post this questino to the ODBC list or forum.

However, I think your problem is in your stored procedure and not in how you are calling it with ODBC or ODBCClient.  Please refer to the documentation for creating a stored procedure for more information.