How to save null in datetime field?

Posts   
 
    
KyleJ
User
Posts: 4
Joined: 14-Mar-2005
# Posted on: 10-May-2006 20:53:37   

How do I save a null in a datetime field?

customer.StartDate = nothing Dim adapter As New DataAccessAdapter() adapter.SaveEntity(customer, True)

mikeg22
User
Posts: 411
Joined: 30-Jun-2005
# Posted on: 10-May-2006 21:14:26   

KyleJ wrote:

How do I save a null in a datetime field?

customer.StartDate = nothing Dim adapter As New DataAccessAdapter() adapter.SaveEntity(customer, True)

VB


customer.SetNewFieldValue(CustomerFieldIndex.StartDate, Nothing)

C#


customer.SetNewFieldValue(CustomerFieldIndex.StartDate, Null);

KyleJ
User
Posts: 4
Joined: 14-Mar-2005
# Posted on: 10-May-2006 21:15:24   

Found it... it was where I left my brain....

Customer.SetNewFieldValue("StartDate", Nothing)