[Zope] setting date to Null in MS SQL?
Kelley, Sean
SKelley@ci.santa-rosa.ca.us
Wed, 21 May 2003 15:37:40 -0700
I have a simple app where I need to let people set dates to null via a form.
I am trying to test for an empty form field and set the value to NULL if
empty. It seems to work on form submission but when I do a database query I
see it is actually set to 1/1/1900
I have found a way to update a record if it already has a value and you
clear the form field, but for some reason this same method does not work for
an initial insert.
In both of my sql methods I have:
<dtml-if "AppDelDate==''">
AppDelDate=NULL,
<dtml-else>
'<dtml-var name="AppDelDate" sql_quote>',
</dtml-if>
What am I missing?