I have an app which uses stored procedures to select, insert, update and delete rows into various tables. The SP's run fine but I can't seem to insert values from my form with no value (eg: an empty text box) even though the relevant columns in the tables are set to accept nulls.

I'm doing this at the moment:

If Trim(txtCM_GraduationDate.Text) = "" Then
sqlCM_InsertContact.Parameters("@cnt_DateGraduate").Value = ????
Else
sqlCM_InsertContact.Parameters("@cnt_DateGraduate").Value = Trim(txtCM_GraduationDate.Text)
End If

Where I have the '???' above is where I want to insert a null smalldatetime - or do I have to use "01/01/1900" or something similiar? I really don't want any value in there - I actually want a null value. It's the same for integer/numeric fields - I want to write a null value to the appropriate column.

Cany anyone help me out this one - I have a huge deadline looming and can't seem to solve this (very simple) question - any help would be greatly appreciated!!

TIA...

Mike.