Try the following:
Insert into off
(
        formdate,
        admin,
        side1collectionsdate,
        side2collectionsdate,
        side3collectionsdate,
        side4collectionsdate,
        side5collectionsdate
)
VALUES
(
        <CFQUERYPARAM VALUE="#form.formdate#"
CFSQLTYPE="CF_SQL_VARCHAR">,
        <CFQUERYPARAM VALUE="#form.admin#"
CFSQLTYPE="CF_SQL_VARCHAR">'#form.admin#',
        <CFQUERYPARAM VALUE="#form.side1collectionsdate#"
CFSQLTYPE="CF_SQL_VARCHAR">,
        <CFQUERYPARAM VALUE="#form.side2collectionsdate#"
CFSQLTYPE="CF_SQL_VARCHAR">,
        <CFQUERYPARAM VALUE="#form.side3collectionsdate#"
CFSQLTYPE="CF_SQL_VARCHAR">,
        <CFQUERYPARAM VALUE="#form.side4collectionsdate#"
CFSQLTYPE="CF_SQL_VARCHAR">,
        <CFQUERYPARAM VALUE="#form.side5collectionsdate#"
CFSQLTYPE="CF_SQL_VARCHAR">
)
</cfquery> 



-----Original Message-----
From: Robert Orlini [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 27, 2005 12:56 PM
To: CF-Talk
Subject: RE: OT SQL date/time default

Ian, Randy,

Just a plain insert and I fear that is the problem...only I don't work
with CF enough to know the coding tips.

Here it is below:

<cfquery name="off" datasource="off">
Insert into off
(
formdate,
admin,
side1collectionsdate,
side2collectionsdate,
side3collectionsdate,
side4collectionsdate,
side5collectionsdate
)
VALUES
(
'#form.formdate#',
'#form.admin#',
'#form.side1collectionsdate#',
'#form.side2collectionsdate#',
'#form.side3collectionsdate#',
'#form.side4collectionsdate#',
'#form.side5collectionsdate#'
)
</cfquery>
-----Original Message-----
From: Adkins, Randy [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 12:45 PM
To: CF-Talk
Subject: RE: OT SQL date/time default


On the INSERT query are you setting the field to '' or NULL?

If you use 

myDate = '' then yes you will more than likely get that Type of date,
try using myDate = NULL

 

-----Original Message-----
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 12:37 PM
To: CF-Talk
Subject: RE: OT SQL date/time default

Randy default is now (null) and allow nulls is checked, but when filed
is blank and submitted 1/1/1900 is inserted.

-----Original Message-----
From: Adkins, Randy [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 12:07 PM
To: CF-Talk
Subject: RE: OT SQL date/time default


Check to see if the Default Value of the field is set.
Else you can insert a NULL to the field based on the INSERT query


-----Original Message-----
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 12:03 PM
To: CF-Talk
Subject: OT SQL date/time default

I have a form that if the date field is blank SQL automatically inserts
the date of 1/1/1900 and then this displays.

How can I have it leave this field blank? The column is set as datetime
in design view.

Thx.

Robert O.












~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191973
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to