Bug #74195 Problems working with existing stored procedures in dataset designer
Submitted: 2 Oct 2014 15:53 Modified: 20 Aug 2018 17:20
Reporter: Vadim Rapp Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Visual Studio Integration Severity:S2 (Serious)
Version:1.2.3, .Net 6.9.5 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[2 Oct 2014 15:53] Vadim Rapp
Description:
I have problems when in Visual Studio I'm trying to create queries to existing stored procedures in MySQL. I create them by adding a dataset to the project, and then adding a query to the dataset, specifying data connection based on mysql connector. 

Problem #1: if the stored procedure has parameter, the parameter is not created automatically, and the wizard shows error "parameter 'parm1' not found in the collection. 

Problem #2: if the stored procedure has error handler inside, the error kicks in during the design. For example: 

CREATE PROCEDURE test(IN parm1 INT) 
BEGIN 
IF CURDATE() > '2014-1-1' 
THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'too late', MYSQL_ERRNO = 1001; 
END IF; 

END 

As soon as in Visual Studio dataset designer I select this stored procedure in the wizard that creates a query, I see the error message, and the parameter is not recognized.

How to repeat:
In mysql, create stored procedure like above
Create new project in visual studio 2008, where mysql adapter is already installed
Add new item to the project - add dataset
In dataset, right-click and add new tableadapter. This will invoke a wizard.
Specify existing mysql connection, or create new, using datasource "mysql database"
Advance two screens in the wizard, and say this will be based on existing stored procedure.
Select stored procedure we created

observe error message, and no parameters in the created tableadapter.

Suggested fix:
In fact if you work for 15 minutes with the tableadapter based on visual studio mysql addon, you will probably find 10 more problems. For example, try to preview the data, and you will see error message that you have not connected to the server. You have to open Server Manager and expand mysql database first. There will be more problems. This piece appears to be not thoroughly tested.
[2 Oct 2014 15:54] Vadim Rapp
I tried to discuss this in the forum, but so far no replies.

http://forums.mysql.com/read.php?174,621383,621383#msg-621383
[18 Dec 2014 4:46] Chiranjeevi Battula
Hello Vadim Rapp,

Thank you for the bug report.
Verified this behavior on Visual Studio 2013 (VB.Net) with  MySQL Connector/Net 6.9.5.

Thanks,
Chiranjeevi.
[6 Apr 2015 7:40] JONATAN TADEO COVIELLO GONZALEZ
Some day you will follow up on this error ?, please respond something that lets us know , what the purpose of this error ... even if it is that you do nothing about it ..
Thank You.
[6 Apr 2015 11:53] Vadim Rapp
> Some day you will follow up on this error ? please respond something that lets us know , what the purpose of this error ...

Are you asking me (the one who submitted it), or the developers?
[6 Apr 2015 20:25] JONATAN TADEO COVIELLO GONZALEZ
I asked to the developers.
Since visual studio 2013 there came this error, and this is the only ticket I've seen that have reported the error. I wrote the comment trying to support you. Waiting for MySQL developers get a reply.
[6 Apr 2015 21:20] Francisco Alberto Tirado Zavala
Hello.

We'll take care of this bug as well as others that were reported.
Once the release is ready this bug will be updated with the version that will contains the fix.

Thanks for your time.
[26 Jun 2015 6:58] Jorge Rojas
Connector 6.9.6 same behavior, its simply useless!
[14 Sep 2015 17:29] Alonso Corrales
The problem still.
I have the same problem with Visual Studio 2015, and Visual Studio 2015 CE.

I got MySQL for Visual Studio 1.2.4 and .Net Conector 6.9.7 and the problem still in there.
[17 Sep 2015 15:54] Javier Treviño
Increasing priority of this bug, we'll fix it on 1.2.5 instead of 1.2.6.
[19 Oct 2015 16:35] Javier Treviño
Posted by developer:
 
Fixed the bug where the dataset designer wizard was not showing the stored procedure parameters when creating a "TableAdapter" using existing stored procedures for the "Select" command. Also, fixed the bug where the stored procedure command having an "error" command was avoiding the dataset to be created.
[19 Oct 2015 18:06] Alonso Corrales
Great news Javier Treviño, you can share with us some approximate release date of the new version that brings us the new fix?

Thanks.
[19 Oct 2015 18:12] Javier Treviño
Hi Alonso,
Unfortunately we cannot disclose release dates, but this is fixed so you will be seeing it in the upcoming 1.2.5 version.

We make announcements of new versions in the MySQL Forums (http://forums.mysql.com/list.php?3), also in social media like Facebook and Twitter. So please check there.

Best regards.
[20 Aug 2018 17:20] Jose Ramirez
Fixed in MySQL for Visual Studio 1.2.5, and here's
the changelog entry:

The dataset designer wizard was not showing the stored procedure
parameters when creating a "TableAdapter" using existing stored procedures
for the "Select" command. Also, the stored procedure command had an
"error" thus causing the dataset to not be created.

Thank you for the bug report.