I have an insert that works just fine without the date &%$@* in it. I have scowered (sp?) this forum and have found many threads... no soap on any working form me. So, I will show you my code, then a copy of the error. BTW... my field in the access database is named date and the data type is date/time.
code:
<CFSET dateEntered = #CreateODBCDate(DateFormat(now(), "yyyy-mm-dd"
)#>
<cfquery name="insertdata" datasource="#datasource#" dbtype="ODBC">
INSERT INTO tbldonors (id,address,cctype,ccmonth,ccnumber,ccyear,city,comments country,donoramount,email,firstname,phonenumb,secondname,state,zip,date)
VALUES(#findmax.newid#,'#address#','#cctype#',#ccmonth#,'#ccnumber#',#ccyear#,'#city#', '#comments#','#country#',#donoramount#,'#email#','#firstname#','#phonenumb#','#secondname#','#state#','#zip#,'#dateEntered#')
</cfquery>
error:
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
SQL = "INSERT INTO tbldonors (id,address,cctype,ccmonth,ccnumber,ccyear,city,comments country,donoramount,email,firstname,phonenumb,secondname,state,zip,date) VALUES(2,'18347 emerald oaks','visa',8,'443433434343',2004,'san antonio', 'test','usa',100,'cscott@satx.rr.com','christopher','2104039344','mathews','texas','222222,'{d '2001-11-29'}')"
code:
<CFSET dateEntered = #CreateODBCDate(DateFormat(now(), "yyyy-mm-dd"

<cfquery name="insertdata" datasource="#datasource#" dbtype="ODBC">
INSERT INTO tbldonors (id,address,cctype,ccmonth,ccnumber,ccyear,city,comments country,donoramount,email,firstname,phonenumb,secondname,state,zip,date)
VALUES(#findmax.newid#,'#address#','#cctype#',#ccmonth#,'#ccnumber#',#ccyear#,'#city#', '#comments#','#country#',#donoramount#,'#email#','#firstname#','#phonenumb#','#secondname#','#state#','#zip#,'#dateEntered#')
</cfquery>
error:
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
SQL = "INSERT INTO tbldonors (id,address,cctype,ccmonth,ccnumber,ccyear,city,comments country,donoramount,email,firstname,phonenumb,secondname,state,zip,date) VALUES(2,'18347 emerald oaks','visa',8,'443433434343',2004,'san antonio', 'test','usa',100,'cscott@satx.rr.com','christopher','2104039344','mathews','texas','222222,'{d '2001-11-29'}')"