It seems to be possible to assign DBNull.Value if you define the DBType of
the parameter as DbType.Object (see the example code below). However, I
think there may be a more fundamental problem here. How would you define the
parameter in the SQL string? 'WHERE SomeField = ?' isn't going to work,
because nothing is equal to Null, not even another Null. (Is one unknown
value equal to another unknown value? The answer is unknown, i.e. Null).
In short, I think the answer is not to assign a Null value to a parameter,
but not to use a parameter when looking for Null values, use 'WHERE
SomeField IS NULL' in the SQL statement instead.
But you may get a more definitive answer in an ASP.NET (or ADO.NET)
newsgroup.
cmm = New System.Data.OleDb.OleDbCommand
With cmm
prm = .CreateParameter
prm.DbType = DbType.Object
prm.Value = DBNull.Value
End With