I have the code below that checks to see if the Notes textbox is left blank. If it is left blank then I want it to insert NULL into that table field. But I'm getting an error saying DBNULL is a type and cannot be used as an expression. How can I get it to insert NULL, currently it enters a blank ("") if the Notes textbox has no data in it. Thank you in advance.
Dim NotevalueToPutInDatabase As String
If (String.IsNullOrEmpty(txtNotes.Text)) Then
NotevalueToPutInDatabase = DBNull
NotevalueToPutInDatabase = txtNotes.Text