linq to datasets - get a specific datarow
i have a table with these columns: errorCode (int) errorDesc (Varchar)
i'm trying to get the datarow where errorCode is 5:
DataRow resultCodeRow = (from resultCodesTableRow in resultCodesDT.AsEnumerable()
where resultCodesTableR开发者_如何学JAVAow.Field<int>("result_Code_colum_Name") == 5
select resultCodesTableRow).Single();
why do i get the error:
"Specified cast is not valid."
how would you write it ?
You need to change it to decimal
PK
精彩评论