CREATE TABLE `animals` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, `name` char(30) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=My ISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1$$ On MSSQL you can use something like CREATE TABLE [dbo].[animals]( [id] [int] IDENTITY(1,1) NOT NULL, [name] [char](30) NOT NULL ) ON [PRIMARY] GO alter table animals add constraint PK_animals primary key ( id ) go The last line "alter table... If you don't add it, you will not get the exception behavior (not adding the constraint basically implies that Data Reader.
Get Schema Table returns Is Key=False for Id column, and so the typed dataset doesn't get the Unique Constraint in the respective Data Table).
Add a subroutine to set the default value of this column to zero as follows:- Private Sub Data Grid View1_Default Values Needed(By Val sender As Object, By Val e As System. Below details on how to reproduce: On My SQL, you can create a table as follow. Note that this error occurs before you even try to update the actual table. Value = 0 End With End Sub As soon as you try to enter 2 new rows you get an error about duplicate values. Assumed this was because 6.3.6 was not added as a reference - tried to do this but it was not in the list of available references. PLEASE HELP - how do I get back to where I was before trying to do the upgrade to 6.3.6? NET framework that my project was targetting from 2 to 4 I could add the reference to My SQL and the errors went away and I was able to run the project. How to repeat: Create a new screen using Visual Studio 2010 and add a datagridview to it. Suggested fix: This worked in earlier versions of the connector e.g. (using Visual Studio 2005)Tried to install 6.3.6 - had to uninstall 6.3.5 first. QUESTION - should 6.3.6 only be available with version 4 of . I'm not sure how I had 6.3.5 working with version 2 of . If you try and add more than one row into a datagrid as soon as you go into the third row it throws an contraint error as two rows cannot have a zero value in their primary key. The Unique Constraint is charge of throwing the exception in ADO. Check Constraint following this stack trace System. Data Row Action e Action, bool fire Event = true) Line 3038 0x13a bytes C# System.