Bug #25725 Visual Studio Plugin does cannot create
Submitted: 19 Jan 2007 19:18 Modified: 8 Feb 2007 20:01
Reporter: Robin Wheeler Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Visual Studio Plugin Severity:S1 (Critical)
Version:1.0.2 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: .net, plugin, vs

[19 Jan 2007 19:18] Robin Wheeler
Description:
When I create a new DataSet via the wizard in VS I am prompted to select the tables, views, procedure and functions I would like to include. However, none the individual objects are displayed (normally you can drill down into, say, the tables list and select individual tables.)

If I complete the wizard anyway, and then add a new table adapter and type my own "SELECT * FROM foo" querry I can connect to the table and see the data, but the wizard will not create UPDATE, DELETE, and INSERT querries. The option to do so is greyed out. 

According to MicroSoft this option being greyed out is expected if something about the SELECT query would prevent an UPDATE query from running, like a JOIN. But my SELECT query is a simple as possible. 

I've tried all sorts of workarounds, including manually creating my own querries and using the ODBC connector, but I've run into problems in every one. I don't want to report every problem now but rather start at the beginning. 

Version info: 
Visual Studio 2005 SP1 
Connector .NET 5.0.3 
VS Plugin 1.0.2 
MySQL 5.0.27 on Solaris 9

How to repeat:
Create a new DataSet via the VS wizard.
[22 Jan 2007 10:37] Tonci Grgin
Hi Robin and thanks for your report.

Snip from release announcement:
"This release does not include the ability to work with the DataSetdesigner but we will be making a beta of 1.1 available shortly that will include this functionality."

As I workaround until 1.1 I suggest you to use server explorer as a lookup.
[8 Feb 2007 20:01] Robin Wheeler
Thanks for the info. I just installed the alpha of 1.1.2 and it looks like the selection of tables from the Add DataSource Wizard is working, but we still cannot automatically generate Update, Insert, and Delete statements from the configuration wizard. Do you plan to include these features?
[13 Feb 2007 22:37] Reggie Burnett
Yes, we are working on them.
[26 May 2007 14:43] Frederic Peters
Hello, I also have the same problem.
The wizard does not generates update, insert and delete statements.
A workaround I found is to add a line in the generated code of the InitAdapter routine:

Adding the line:

 new MySqlCommandBuilder(this._adapter);

just after the line:

 this._adapter = new MySql.Data.MySqlClient.MySqlDataAdapter();

solves the problem, however updating generated code is not a good idea and it gets overwritten when the generated code is updated. I did not found another way to use it, because all fields of the tableadapter class are "private"

The bets way is of course to generate the sql commands within the wizard. Have you got an idea when this will be available ? 
thanks