G
Guest
Hello:
Even after I set the primary key of a table in a data set by:
DataSet11.Tables("DISP_STATUS").PrimaryKey = New DataColumn()
{DataSet11.Tables("DISP_STATUS").Columns("D_Stat_CD_C")}
when I search for a row by the key,
Dim dr As DataRow = DataSet11.Tables("DISP_STATUS").Rows.Find(New Object()
{dataKey})
I get an exception, "System.Data.MissingPrimaryKeyException: Table doesn't
have a primary key."
What am I doing wrong?
Thanks for your help.
Venki
Even after I set the primary key of a table in a data set by:
DataSet11.Tables("DISP_STATUS").PrimaryKey = New DataColumn()
{DataSet11.Tables("DISP_STATUS").Columns("D_Stat_CD_C")}
when I search for a row by the key,
Dim dr As DataRow = DataSet11.Tables("DISP_STATUS").Rows.Find(New Object()
{dataKey})
I get an exception, "System.Data.MissingPrimaryKeyException: Table doesn't
have a primary key."
What am I doing wrong?
Thanks for your help.
Venki