This is a pretty late response, but I had this very problem and neither of these answers were right. DBNull doesn't exist in Classic ASP, and there has to be a way to set SQL's DateTime fields to null (because if you don't set them from the beginning then they're already null).
I spent about half an hour searching for this going through pages of Google results, and finally found it! I wanted to post it here for future reference because I think it's pretty relevant.
First, you can use an SQL query to change a field to null, and you just use the string "null" in that case.
However I prefer using ASP's built-in ADODB.Recordset object to make an SQL query to find the records, and its AddNew/Update/Delete method to modify the database. I'm a die hard JS fan, so of course I believe eval is evil, and doing the same thing with SQL queries feels wrong to me. So I needed a different way to set records to null.
And I found the solution! It's as simple as using the variable "Null" in VBScript. Notepad++ didn't highlight it so I thought it wouldn't work, plus I thought "Nothing" was VBScript's version of null, which (Nothing) didn't work. You don't want to cast Null either, just pass in Null.
Here's what my code looks like (note I'm writing this to learn, so I didn't create a permission system or anything):
id = Request("ID")
if id <> "" and Request.Form("eventName") <> "" then
fields = Array("eventName", "eventDate")
if Request.Form("eventDate") <> "" then
values = Array(Request.Form("eventName"), CDate(Request.Form("eventDate"))
values = Array(Request.Form("eventName"), Null)
Set item = Server.CreateObject("ADODB.RecordSet")
item.open "select top 1 * from calendar where id = " & id, "DSN=Calendar.dsn", , adLockOptimistic, adCmdText
if not item.EOF then
item.Update fields, values
Here's where it's from (even though the asker decided to go with the SQL query update option >.>)...http://forums.devx.com/showthread.php?45891-Insert-Empty-Date