Dodsworth
asked on
Linq to SQL Insert Problem
I have an entity class as below, but when I try to add a new row without specifying an EndDate, I get the error..
System.Data.SqlServerCe.Sq lCeExcepti on: An overflow occurred while converting to datetime
If I add a row with an EndDate then all is fine.
System.Data.SqlServerCe.Sq
If I add a row with an EndDate then all is fine.
<Table> _
Public Class Notes
<Column(IsDbGenerated:=True, IsPrimaryKey:=True)> _
Public Property Id() As Integer
Get
Return m_Id
End Get
Set(value As Integer)
m_Id = value
End Set
End Property
Private m_Id As Integer
<Column> _
Public Property StartDate() As System.Nullable(Of Date)
Get
Return m_StartDate
End Get
Set(value As System.Nullable(Of Date))
m_StartDate = value
End Set
End Property
Private m_StartDate As DateTime
<Column(CanBeNull:=True)> _
Public Property EndDate() As System.Nullable(Of Date)
Get
Return m_EndDate
End Get
Set(value As System.Nullable(Of Date))
m_EndDate = value
End Set
End Property
Private m_EndDate As DateTime
<Column> _
Public Property Note() As String
Get
Return m_Note
End Get
Set(value As String)
m_Note = value
End Set
End Property
Private m_Note As String
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER