I am using the above code to find if I have an existing DataRow in my DataTable that matches the productid and the customer number. If the resultcnt is 0 then I am going to add a DataRow for the customer and the product. How do I update the datarow if the resultcnt = 1? Where can I find the information on this? I have been searching all morning.Code:var results = from myRow in dt.AsEnumerable() where myRow.Field<string>("ProductID") == PMTDProductID && myRow.Field<string>("CustNo") == APMFCustNo select myRow; int resultcnt = results.Count();




Reply With Quote