I have the following code:
Code:
 If Trim(txtConfirmationDate.Text) <> "" Then
     sqlinsert2.Parameters.AddWithValue("@CONFIRMDATE", CDate(txtConfirmationDate.Text))
Else
     sqlinsert2.Parameters.AddWithValue("@CONFIRMDATE", VB.vbNull)
End If
Unfortunately, it writes "01/01/1900" to the database. How do I get it to just leave the field as NULL?