DuplicateNameException when using wizards and dataset
Posted: Wed 03 May 2006 23:47
Hello, I started to use the trial edition of the MySQL .NET provider and the wizards in VS2003 C# Std.
I used the MySqlConnection object to create the connection - OK
I used the MySqlDataAdapter to access the database and the table, generating the SQL select and update commands - OK
I created the dataset using the data-adapter and I connected it to a datagrid and filled the dataset and the datagrid showed the data from the table - OK
When I ran the program it crashed with a System.Data.DuplicateNameException
on the primary key field.
The sample programs run OK.
Have I used the components properly or is there a certain sequence of steps I should take when using the wizards or is better to just use code?
Regards
I used the MySqlConnection object to create the connection - OK
I used the MySqlDataAdapter to access the database and the table, generating the SQL select and update commands - OK
I created the dataset using the data-adapter and I connected it to a datagrid and filled the dataset and the datagrid showed the data from the table - OK
When I ran the program it crashed with a System.Data.DuplicateNameException
The sample programs run OK.
Have I used the components properly or is there a certain sequence of steps I should take when using the wizards or is better to just use code?
Regards