Bug #26747 DefaultValue for a column always set to <DBNull> for a DataSet
Submitted: 1 Mar 2007 11:46 Modified: 29 Mar 2007 15:37
Reporter: Peter Pawluk Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Visual Studio Plugin Severity:S3 (Non-critical)
Version:alpha 1.1.2 OS:Windows (XP Pro SP2)
Assigned to: CPU Architecture:Any

[1 Mar 2007 11:46] Peter Pawluk
Description:
Open Server Explorer and navigate to a column of a table that has a default value assigned. The "Property Window" will show the "Default Value" and will be correct.

Now drag the table onto your designer to create a new typesafe dataset, and now look at the "Property Window" for the column in the dataset just created. You will see the DefaultValue property is incorrectly set to <DBNull>.

How to repeat:

Create a table in MySQL and make sure you set a default value for a column.
e.g.
CREATE TABLE people (
  id   int       NOT NULL,
  name char(25)  NOT NULL default 'sometext',

  PRIMARY KEY (id)

) type = InnoDB;

In VS2005, create a new DataSet in your project, open server explorer, and create a new database connection, locate the table 'people' and drag it onto the designer.
[1 Mar 2007 15:34] MySQL Verification Team
Thank you for the bug report.
[29 Mar 2007 15:37] Reggie Burnett
I don't know of any providers that do pull this information forward.  SqlClient behaves exactly the same way.  I would implement it but it's actually very hard to implement.  In fact, I currently have no good idea for how to implement it.  In the future, if I see a way to make this happen I will.  Till then....