Interesting! So the len() is marking the null attribute yes or no... Thanks Dan! That looks about as clean as it can get.
-----Original Message----- From: Dan Vega [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 19, 2007 12:18 PM To: CF-Talk Subject: Re: date and ms sql You can use the null attribute of the cfqueryparam tag like so INSERT INTO contact (dob) VALUES ( <cfqueryparam value="#arguments.dob#" null="#not len(arguments.dob)#"> ) On 9/19/07, Chad Gray <[EMAIL PROTECTED]> wrote: > > I have a form that asks for a date. > > If no date is entered into the form what gets inserted into the database > is 01/01/1900. > > How do I get the database to have NULL or blank and not this date > 01/01/1900? > > I don't know if it is best to try to fix this on the database side or > write cfif's to see if the form variables is blank. > > Thanks! > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288823 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

