James,

"DateTime fields in Access need to be fed ODBC formatted date/times either
using CreateODBCDate/CreateODBCDateTime or <cfqueryparam> You don't need to
wrap odbc datetimes in quotes."
I've messed around with these ideas but no matter what I try I get an error
message coming back. Here's what I've got at the moment:
Couple of changes....


<cfset Departure_Date = createODBCDate(form.DepartureDateTxt)> <cfset Return_Date = createODBCDate(form.ReturnDateTxt)> <cfquery datasource="#application.datasource#" name="update_record2"> UPDATE Tour_dates SET Tour_dates.departuredates = #Departure_Date#, Tour_dates.returndates = #Return_Date#, Tour_dates.fares = '#form.FaresTxt#' WHERE (Tour_dates.Date_ID=#url.Tour_ID#) AND (Tour_dates.Tour_ID=#url.ID#) </cfquery>

I've put your cfsets outside of your cfquery and taken out the #'s around form.datefieldname. They aren't required in a cfset.

Also, I've taken the single quotes off of the date variables in the query, so you now have returndates = #return_date# without single quotes around #return_date#

I've done a CFOUTPUT of the SET Departure_Date and it comes out as {d
'2004-11-09'}
That's correct. Thats an ODBC Date format.

You might find that you get some error about single quotes from the query, in which case do the createodbcdate() in the query itself.
eg. Tour_dates.returndates = #createODBCDate(form.ReturnDateTxt)#


And as long as you've really got date fields in access that should work just fine.

Regards

Stephen

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



Reply via email to