M
Movsum Zade
Hi,
I have datagrid filled using SqlDataAdapter. One of the fields is a date
field which can be null.
When I assign null value I receive the following error:
"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and
12/31/9999 11:59:59 PM."
My code:
Dim dateunl As TextBox
dateunl = CType(e.Item.Cells(11).Controls(0), TextBox)
If dateunl.Text = "" Then
dateunloadnew = Nothing
Else : dateunloadnew = dateunl.Text
End If
Dim r As Loadings._Dom_LoadingsRow
r = Loadings2._Dom_Loadings.FindByid(key)
r.DateUnload() = dateunloadnew
SqlDataAdapter1.Update(Loadings2)
Thanks,
Movsum
I have datagrid filled using SqlDataAdapter. One of the fields is a date
field which can be null.
When I assign null value I receive the following error:
"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and
12/31/9999 11:59:59 PM."
My code:
Dim dateunl As TextBox
dateunl = CType(e.Item.Cells(11).Controls(0), TextBox)
If dateunl.Text = "" Then
dateunloadnew = Nothing
Else : dateunloadnew = dateunl.Text
End If
Dim r As Loadings._Dom_LoadingsRow
r = Loadings2._Dom_Loadings.FindByid(key)
r.DateUnload() = dateunloadnew
SqlDataAdapter1.Update(Loadings2)
Thanks,
Movsum