Geoff,
First, what is the primary key of that table? or to put it differently,
could you include the definition of that table? I'm assuming that it is an
autonumber field that you're not including in the insert statement, right?
(not being insulting, my mother told me to "Keep a firm grasp on the obvious
and you'll never go wrong!", but I'm still learning to apply that)
Second, could you try wrapping the CreateODBCDate function around the
variable you're trying to insert, like:
<!--- query fragment --->
#CreateODBCDate(logdate)#,
#CreateODBCDate(> birthdate)#,
#CreateODBCDate(expirationdate)#
<!--- end query fragment --->
And lastly, would you try removing either the outer or inner single quotes
on the date string, then changing one or the other to double quotes? I
strongly suspect that may be your problem:
'{ts '2001-04-13 11:58:03'}'
HTH,
Jeff Davis
Macromedia Certified Cold Fusion Trainer, Developer
Fig Leaf Software
______________________________________
"If written directions alone would suffice, libraries wouldn't need to have
the rest of the universities attached."
Miss Manners
______________________________________
>
> Date: Fri, 13 Apr 2001 11:59:06 -0500
> From: Geoff Hoffman <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: INSERT INTO (access mdb table) PROBLEM
> Message-ID: <[EMAIL PROTECTED]>
>
> >
> >Put single quotes around your DATE variables.
> >
> >Alex
>
>
> ALEX,
>
> thanks but it still fails. I have other queries on other pages (such
> as UPDATE instead of INSERT INTO) that have no problem inserting
> dateTime data without single quotes, and without
> #CreateODBCDate(Now())#
> either.... strange. In fact, in my previous post, the #temp.date#
> fields are coming from a query that previously put the
> dateTime values
> into another table, so I know that it does work. It must be something
> else.
>
>
>
> ODBC Error Code = 37000 (Syntax error or access violation)
>
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT
> INTO statement.
>
>
> SQL = "INSERT INTO content(guid, type_id, client_id, user_id, logdate,
> birthdate, expirationdate) VALUES('3AN1FPEA', 1, 2, 1, '{ts '2001-
> 04-13 11:58:03'}', '{ts '2001-01-01 00:00:00'}', '{ts '2099-12-31
> 23:59:59'}');"
>
> Geoff Hoffman
> [EMAIL PROTECTED]
SNIP
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists