Table doesn't have a primary key Table doesn't have a primary key mysql mysql

Table doesn't have a primary key


You need to set the PrimaryKey property of your DataTable object before you call Find

DataColumn[] keyColumns = new DataColumn[1];keyColumns[0] = dt.Columns["<columnname>"];dt.PrimaryKey = keyColumns;