  | |  | Problem with Stored Procedure execution | Problem with Stored Procedure execution 2004-12-11 - By gabriele zelasco
Back Hi , Sorry for my English,
My configuration is: Win2000 SP4, Mysql server and clients alpha 5.0.1, MyOdbc 3.51.10 Well, when I try to execute a simple SP like this:
CREATE PROCEDURE `db01`.`Sp01`() BEGIN SELECT nome,cognome FROM TbAna; END
I got the "famous" error message : Error Code : 1311 SELECT in a stored procedure must have INTO
I've already read about it on your site
MySQL Bugs: #2273: SELECT in a stored procedure must have INTO and
MySQL Bugs: #2658: SELECT in a stored procedure must have INTO My questions are the following: When I call Sp01 from the consolle (mysql > call Sp01();) or from MySql Query Browser 1.1.2 it works (I got a resultset) but when I try the same from VB6 (with correct syntax) or from other apps such as SQLyog, EMS, ecc. I got the error (err.1311) ?? Well I've read everything about it in the web. Someone talks about Client Flags (CLIENT_MULTI_RESULTS ON) but I seem that it can be set only by C API (mysql_real_connect(&mysql,...,CLIENT_MULTI_RESULTS);) and I would like to resolve using ODBC. So, setting client flag is the solution ? Can I set that in MyOdbc ? I've to wait for 3.53 release ? Why I got result with consolle and no result with other apps or VB ? Have you a solution ?
Thank in advance
Gabriele Zelasco (Italy)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="MSHTML 6.00.2800.1400" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Hi , Sorry for my English,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>My configuration is:</FONT></DIV> <DIV><FONT face=Arial size=2>Win2000 SP4, Mysql server and clients alpha 5.0.1, MyOdbc 3.51.10</FONT></DIV> <DIV><FONT face=Arial size=2>Well, when I try to execute a simple SP like this:</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>CREATE PROCEDURE `db01`.`Sp01`()<BR>BEGIN<BR >SELECT nome,cognome FROM TbAna;<BR>END</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I got the "famous" error message : </FONT></DIV> <DIV><FONT face=Arial size=2>Error Code : 1311 SELECT in a stored procedure must have INTO</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I've already read about it on your site</FONT></DIV> <DIV> <H1> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso -ansi-language: EN-GB">MySQL Bugs: #2273: SELECT in a stored procedure must have INTO and</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso -ansi-language: EN-GB; mso-fareast-font-family: 'Arial Unicode MS'"><?xml :namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><SPAN lang=EN-GB style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso -ansi-language: EN-GB; mso-fareast-font-family: 'Times New Roman'; mso-fareast -language: IT; mso-bidi-language: AR-SA">MySQL Bugs: #2658: SELECT in a stored procedure must have INTO</SPAN></H1></DIV> <DIV><FONT face=Arial size=2>My questions are the following:</FONT></DIV> <DIV><FONT face=Arial size=2>When I call Sp01 from the consolle (mysql > ; call Sp01();) or from MySql Query Browser 1.1.2 it works (I got a resultset)</FONT></DIV> <DIV><FONT face=Arial size=2>but when I try the same from VB6 (with correct syntax) or from other apps such as SQLyog, EMS, ecc. I got the error (err.1311) ??</FONT></DIV> <DIV><FONT face=Arial size=2>Well I've read everything about it in the web . </FONT></DIV> <DIV><FONT face=Arial size=2>Someone talks about Client Flags (CLIENT_MULTI_RESULTS ON) but I seem that it can be set </FONT></DIV> <DIV><FONT face=Arial size=2>only by </FONT><FONT face=Arial size=2>C API <FONT size=3><FONT size=2>(mysql_real_connect(&mysql,...,CLIENT_MULTI_RESULTS);) and I would like to resolve using ODBC.</FONT></FONT></FONT></DIV> <DIV><FONT face=Arial size=2><FONT size=3><FONT size=2>So, setting client flag is the solution ? Can I set that in MyOdbc ? I've to wait for 3.53 release ?</FONT></FONT></FONT></DIV> <DIV><FONT face=Arial size=2><FONT size=3><FONT size=2>Why I got result with consolle and no result with other apps or VB ? Have you a solution ?</FONT></FONT></FONT></DIV> <DIV><FONT face=Arial size=2><FONT size=3><FONT size=2></FONT></FONT></FONT> </DIV> <DIV><FONT face=Arial size=2><FONT size=3><FONT size=2>Thank in advance </FONT></FONT></FONT></DIV> <DIV><FONT face=Arial size=2><FONT size=3><FONT size=2></FONT></FONT></FONT> </DIV> <DIV><FONT face=Arial size=2><FONT size=3><FONT size=2>Gabriele Zelasco (Italy)</FONT></DIV> <DIV><BR></DIV></FONT></FONT> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2> </FONT></DIV></BODY></HTML>
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.5.0 - Release Date: 09/12/2004
-- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/win32?unsub=mysql@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |