Thank you all for your help it is fixed. I needed to make it null instead of "" if the field was left blank.
Rob -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mark J. Handy Sent: March 6, 2002 12:44 PM To: [EMAIL PROTECTED] Subject: RE: [CFTALKTor] createODBCDate( ) Hey, What does Form.packageDate contain at this point? Is the form passing the info correct?? Mark. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On > Behalf Of Rob Matlow > Sent: Wednesday, March 06, 2002 11:47 AM > To: CFTALK > Subject: [CFTALKTor] createODBCDate( ) > > I cannot seem to get a date to properly insert and update into the > database. > I am using a the createODBCDate( ) function. It works fine if I put in a > date but will not work if there is no date entered. It will not work > without the createODBCDate( ) function either. How do I get around this? > > CODE > > <CFQUERY DATASOURCE="#DSN#"> > UPDATE contacts > SET > packageDate = #CreateODBCDate(Form.packageDate)#, > WHERE > contactID = #Form.ContactID# > </CFQUERY> > > > ERROR > > An error occurred while evaluating the expression: > #CreateODBCDate(Form.packageDate)# > > Error near line 24, column 17. > ------------------------------------------------------------------------ -- > -- > ---- > Parameter 1 of function CreateODBCDate which is now "" must be a date/time > value > > > Thanks, > > Rob > > > - > You are subscribed to the CFUGToronto CFTALK ListSRV. > This message has been posted by: "Rob Matlow" > <[EMAIL PROTECTED]> > To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ > Manager: Kevin Towes ([EMAIL PROTECTED]) > http://www.CFUGToronto.org/ > This System has been donated by Infopreneur, Inc. > (http://www.infopreneur.net) - You are subscribed to the CFUGToronto CFTALK ListSRV. This message has been posted by: "Mark J. Handy" <[EMAIL PROTECTED]> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/ This System has been donated by Infopreneur, Inc. (http://www.infopreneur.net) - You are subscribed to the CFUGToronto CFTALK ListSRV. This message has been posted by: "Rob Matlow" <[EMAIL PROTECTED]> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/ This System has been donated by Infopreneur, Inc. (http://www.infopreneur.net)
