Hi all visitors
i created one table in sql server 2005. In my table has 3 fields( code,name,location)
the field code is the primary key and in column property in sql, i use (is Identity)=yes, identity increment=1 and identity seed=1.
In vb.net, i created one dataset and link to my table.on form, i created one DataGridView and the datasource of that dataGridView is the datasource above.
but in the datagridview, i removed column "Code" in DataGridView.so in my datagridview shows only 2 columns(name,location).in my button Save Source code, i write like this:
Me.ItemGroupBindingSource.EndEdit()
Me.ItemGroupTableAdapter.Update(Me.VinaSaleDataSet.ItemGroup)
i input 3 rows in datagridview, but i can save only 1 row to my table and it also alert error message that "Column 'Code' is constrained to be unique. Value '1' is already present".
How can i save all rows in datagridview to my table at the first time?
Best Regards,