I have a smalldatetime column in SQL that can have a null value, but when I try to insert a null value using SqlTypes.SqlDateTime.Null and LINQtoSQL it puts in 1/1/1900 instead of NULL.
What is the best method to insert a null, or am I doing it at the moment. If I am using the correct method at the moment, what should be done to prevent the 1/1/1900 being displayed on my fields in a WPF application.
The database is SQL 2008.
Thanks
(edit) Code
Public Shared Function saveNewClient(ByVal clientName As String, ByVal active As Boolean, ByVal maintRenew As SqlTypes.SqlDateTime, ByVal currOp As Int32) As Int32
Try
Dim c As New client()
c.crGUID = Guid.NewGuid
c.crClientName = clientName
c.crMaintenanceRenewal = maintRenew
c.crActive = active
c.crAddOp = currOp
c.crAddDate = DateTime.Now
c.crEditOp = currOp
c.crEditDate = DateTime.Now
db.clients.InsertOnSubmit(c)
db.SubmitChanges()
Return c.crID
Catch ex As Exception
Return Nothing
End Try
End Function