Except that will fail because it will try to wrap "Null" in single quotes,
UPDATE Table SET datefield = 'Null' WHERE ...
So you still have to check for the value "Null" and skip the single quotes when you create the sql statement. Nil might be a better alternative.
Not according to his code. When it detects a correct date, that if block inserts the single quotes around the date value. The code turns pVarFieldValue into SQL syntax.
Personally though (and I feel like I say this every SQL topic) I'd use a prepared statement:
Dim UserDate As Date
That way you can let the engine figure it out. In this code, we don't even care if ParseDate succeeded or not. If it did, then we'll have a non-nil date object, and it'll get inserted according to the schema. If it fails, UserDate will be nil, and the engine will interpret that as a null.
It's a little different if your engine is SQLite though, as you'll need to BindType differently in the case of a null.