Zest4Csharp wrote:
hi,
I have a database table without a key field. I managed to view the contents
of the table through a DataSet in a DataGrid in C#. The user can edit the
data in the grid.
Can someone show me how to update the sourse database? I cannot use a
standard 'WHERE' claus simply because there is no key field in the source
table.
One other thing you might consider would be working out which
combinations of fields are "supposed" to be unique then defining either
a pk or a unique constraint on these fields.
If there are duplicates (as I have found in the past when faced with
this dilemna), you can temporarily add an identity int column wich SQL
server will automagically fill in for you and then remove the duplicates
(using your identity column) and then drop this column.
HTH
JB