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!
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288817
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to