[thelist] RE: SQL: Infuriating Date/Time Insert
MILLER David R.
dmiller at mcc.ca
Tue Jan 2 14:56:08 CST 2001
Coming in late on this after holidays. I don't use CF, but I bet I know the
problem. 'Date' is a reserved word for Access. If your field is so named,
use [Date] (i.e., with square brackets) in the SQL code. Proper format for
date values in Access is #-delimited with no quotes.
---------------FROM-------------------
David R. Miller
Manager, Computer-Based Testing
Medical Council of Canada
dmiller at mcc.ca
(613) 521-6012
(613) 521-9722 (fax)
-----------------------------------------
> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Frank
> Sent: Tuesday, December 26, 2000 6:22 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] SQL: Infuriating Date/Time Insert
>
>
>
> Re-sent 'cause I didn't see this appear the first time a couple
> of days ago.
>
> I've got an infuriating problem that has been dogging me for days. I
> keep getting a syntax error, where there should be none. Have I
> missed something? I've tried variation upon variation of trying to
> insert number, a date, a time and a time.
[snip]
> <cfquery name="InsertTimeAndDates" datasource="#datasource#">
> INSERT INTO TimeAndDates (AddrJoin, Date, StartTime, EndTime)
> VALUES(#Form.AddrJoin#, '#TheDate#', '#Form.StartTime#',
> '#Form.EndTime#')
> </cfquery>
More information about the thelist
mailing list