Bug #43628 AutoIncrement not recognized in typed dataset designer
Submitted: 13 Mar 2009 10:29 Modified: 13 Mar 2009 14:28
Reporter: Fabrizio Accatino Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:5.2.5.0 OS:Windows
Assigned to: CPU Architecture:Any

[13 Mar 2009 10:29] Fabrizio Accatino
Description:
AutoIncrement fields are not recognized as AutoIncrement in typed dataset designer in Visual Studio.

How to repeat:

 - Create an empty dataset (xsd) from project --> Add --> New Item --> DataSet
 - Add a new TableAdapter or drag&drop a table from Data Connections.
 - Visual Studio creates a DataTable and a related TableAdapter.
 - The autoincrement field is created as System.UInt32 but with
   Autoincrement=false.  It should be Autoincrement = true.
[13 Mar 2009 10:40] Tonci Grgin
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Explanation:
Hi Fabrizio and thanks for your report. Please next time search bugsdb first. Take, for example, my posts in Bug#27462:
[10 Apr 2007 11:40] Tonci Grgin
There are objective difficulties with AI columns too. Looking into NET specs I've found that:
"Please be aware that the DataColumn class in .NET 1.0 and 1.1 does not allow columns with type of UInt16, UInt32, or UInt64 to be autoincrement columns. If you plan to use autoincremement columns with MySQL, you should consider using signed integer columns." 
is true for NET 2.0 too, and
"Using the data source to populate an Identity or Autonumber column for a new row added to a DataSet creates a unique situation because the DataSet has no direct connection to the data source. As a result, the DataSet is unaware of any values generated automatically by the data source. However, with a data source that can create stored procedures with output parameters, such as ..., you can specify the automatically generated values, such as a new identity value, as an output parameter and use the DataAdapter to map that value back to
the column in the DataSet."

and

[5 Nov 2008 14:02] Tonci Grgin where you can find link to Reggie's explanation of AI handling.
[13 Mar 2009 10:41] Tonci Grgin
Actually, not a duplicate but !Bg as this is known limitation in framework. MS is notorious for not supporting anything they did not invent.
[13 Mar 2009 14:28] Fabrizio Accatino
Hello,

please, excuse me.  I have searched bugsdb but I haven't found the same or similar bug.
[17 Apr 2009 7:04] Tonci Grgin
Bug#44333 was marked as duplicate of this report.
[23 Apr 2009 18:21] Marc Garcia
and the status is??