I am doing this with LINQ:
// let use Linq var DateMarket = from p in Orders_From_CRD.AsEnumerable() where p.Field<Double>("Fill_ID") != null select OrderTable.Rows.Add(p.Field<DateTime>("trade_date"), p.Field<string>("ticker"), p.Field<Double>("EXEC_QTY"), p.Field<Double>("EXEC_PRICE")); TradeTable = DateMarket.CopyToDataTable();
But I have a mistake telling me
Cannot cast DBNull.Value to type 'System.Double'. Please use a nullable type.
Do you know how to use the NULL type in this case?
I tried <Double?> And I got 'Specified cast is not valid.'
francops henri
source share