Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
MySQL++ - Programming with the C++ API to MySQL
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>CREATE PROCEDURE `db01`.`Sp01`()<BR>BEGIN<BR
>SELECT
nome,cognome&nbsp;FROM TbAna;<BR>END</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</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&nbsp; 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&nbsp;are the following:</FONT></DIV>
<DIV><FONT face=Arial size=2>When&nbsp;I call Sp01 from the consolle (mysql &gt
;
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&nbsp;in the web
.
</FONT></DIV>
<DIV><FONT face=Arial size=2>Someone talks about Client Flags
(CLIENT_MULTI_RESULTS&nbsp;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(&amp;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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; </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.