Bug #71961 TypedDataSet Designer does not work with Stored Procedures
Submitted: 7 Mar 2014 2:16 Modified: 9 Feb 2017 23:19
Reporter: Fernando Gonzalez.Sanchez Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Visual Studio Integration Severity:S3 (Non-critical)
Version:1.1.3 OS:Any
Assigned to: Jose Ramirez Ruiz CPU Architecture:Any
Tags: TypedDataSet StoredProcedure

[7 Mar 2014 2:16] Fernando Gonzalez.Sanchez
Description:
As reported in the following forum post
http://forums.mysql.com/read.php?174,609081,609081#msg-609081

Trying to create a TableAdapter from existing stored procedures, using as SELECT stored procedure, one with arguments, fails (the TypedDataSet designer does not seems to detect the arguments).

Returning an error like Parameter 'nameOfParameter' not found in the collection

How to repeat:

1. Add a DataSet to a Visual Studio project
2. Add a new TableAdapter, choose a MySql connection
3. Choose to create the TableAdapter from existing stored procedures
4. As SELECT stored procedure chose one that returns a result set and requires at least one argument.

The following sample stored routine causes the issue:
-- -------------------------------------------------------------------------------- 
-- Routine DDL 
-- Note: comments before and after the routine body will not be stored by the server 
-- -------------------------------------------------------------------------------- 
DELIMITER $$ 

CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_0022_LST_GRUPOS`(IN instituicaoID INT, IN acao TEXT) 
BEGIN 

-- If the parameter acao is "list" then show all courses of table 
if acao="listar" then 

SELECT * FROM `tbl_grupos` INNER JOIN(`tbl_instituicao`) ON 
(`tbl_grupos`.`grupo_instituicao`=`tbl_instituicao`.`instituicao_id`); 

end if; 

-- If the parameter acao is "filter" then just show all course of school of the parameter instituicaoID 

if acao="filtrar" then 

SELECT * FROM `tbl_grupos` INNER JOIN(`tbl_instituicao`) ON 
(`tbl_grupos`.`grupo_instituicao`=`tbl_instituicao`.`instituicao_id`) 
WHERE `tbl_grupos`.`grupo_instituicao` = instituicaoID; 

end if; 

END 

Suggested fix:
Must work with stored procedures with arguments
[6 Aug 2014 14:50] Celio Cantalice
About this error, there are any solution?
[9 Feb 2017 23:19] Jose Ramirez Ruiz
Fixed in version 1.2.5