Seems like, many years ago when I worked with Access, I had to use something like #dateFormat(parseDateTime(myDate), 'mmm d, yyyy')# or maybe just #dateFormat(parseDate(myDate), 'mmm d, yyyy')# to get Access to accept even properly formatted dates.
I can't find any of the old code just now, but maybe this will help. I'll see if I have any old code in a site or perhaps some test code that I used before. I feel certain that the parsing was part of what made it work. Sorry I can't be more specific! hth, Rick -----Original Message----- From: Steve Milburn [mailto:[email protected]] Sent: Friday, November 11, 2011 1:57 PM To: cf-talk Subject: Re: cfajax error Have you tried to quote the last item in the values list (the year)? Depending on how that is defined in the database, it may require quotes. Instead of: #year(foodate)# Try: '#year(foodate)#' HTH Steve On Fri, Nov 11, 2011 at 1:22 PM, Greg Morphis <[email protected]> wrote: > > Same error.. WTH? > foodate is today.. 11/11/2011 > > > Error Executing Database Query. Syntax error in INSERT INTO statement. > The > error occurred in > > *C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\Production\TWST\time_off_s ave.cfm: > line 53* > > 51 : > '#session.user.employee_id#', > 52 : > #createodbcdate(now())#, > *53 : #year(foodate)#* > 54 : ) > 55 : </cfquery> > > ------------------------------ > SQL INSERT INTO time_taken ( time_off_id, employee_id, date_taken, > notes, actionuser, actiondate, year ) VALUES ( 'VV', 'e0012345', {d > '2011-11-11'}, '', 'e0012345', {d '2011-11-11'}, 2011 ) DATASOURCE > blurrrrrred_text > On Fri, Nov 11, 2011 at 12:13 PM, Greg Morphis <[email protected]> wrote: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348688 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

