Bug #46100 unhandled exception: SystemArgumentException
Submitted: 9 Jul 2009 20:46 Modified: 4 Aug 2009 10:43
Reporter: Charles Santee Email Updates:
Status: Closed Impact on me:
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.04 OS:Windows
Assigned to: Reggie Burnett CPU Architecture:Any
Tags: creating tables using VS2008

[9 Jul 2009 20:46] Charles Santee
The following exception occurred in the DataGridView

SystemArgumentException: DataGridViewComboBoxCell value is npot valid

To replace this default dialog please yhandle the DataError Event.

After the error message all previously entered varchar's are changed to bit(10).

Also cannot name save the table because I use an autoincrement id column
and there doesn't seem to be any way to make it a primary key.

How to repeat:
Connect to a mysql database in the server exployer. Right click to bring up the menue that lets you create a new table. Start entering column names and select varchar(10) as the data type. Then change varchar(10) to varchar(20) [or pick a number], you many have to do two or three columns.

Also there does not appear to be anyway to assign a primary key to the database.
[10 Jul 2009 10:36] Tonci Grgin
Oh wow! Thanks for this report Charles.

Verified as described on W2K8SEx64 using c/NET 6.0.4 with .NET FW 3.5 and remote MySQL server 5.1.31 on OpenSolaris box.

  - Open VS2008
  - Open connection from server explorer
  - "Create New Table"
  - Add field ID, type = serial
  - Add field of type VARCHAR, leave default (10)
  - Add field of type VARCHAR and change default (10) to, let's say, (20)
All sorts of errors will pop up when hoovering with mouse over "Data Type" and the first VARCHAR(10) field defined will change to "bit(10)" even though "Column Properties" will still show "varchar(10)".

After changing back BIT(10) to VARCHAR(10) for first defined VARCHAR column, the second one changes to BIT(10)...
[10 Jul 2009 10:37] Tonci Grgin
SShot of problem.

Attachment: Bug46100.jpg (image/jpeg, text), 45.89 KiB.

[31 Jul 2009 20:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


733 Reggie Burnett	2009-07-31
      - fixed bug where editing a table and giving a size based type that is different than
        the default (i.e. varchar(20)) would cause other columns that have the default
        to fail (bug #46100)
[31 Jul 2009 20:17] Reggie Burnett
fixed in 6.0.5 and 6.1.1
[4 Aug 2009 10:43] Tony Bedford
An entry was added to the 6.0.5 and the 6.1.1 changelogs:

When populating a MySQL database table in Visual Studio using the Table Editor, if a VARCHAR(10) column was changed to a VARCHAR(20) column an exception was generated:

SystemArgumentException: DataGridViewComboBoxCell value is not valid.
To replace this default dialog please handle the DataError Event.