VB.NET LINQ to DataSet
Cannot cast DBNull.Value to type 'System.DateTime'. Please use a nullable type.
Replace
Dim SalesOrder = ds.Tables("SO").AsEnumerable()
Dim SO = From h In SalesOrder
Group h By TransactionDate= h.Field(Of DateTime)("transDate") _
Into Group _
Select TransactionDate
With
Dim SalesOrder = ds.Tables("SO").AsEnumerable()
Dim SO = From h In SalesOrder
Group h By TransactionDate= h.Field(Of DateTime?)("transDate") _
Into Group _
Select TransactionDate
No comments:
Post a Comment