OK. I have a field called Password and apparently Access does not like this. So I changed the field name to Pwd and the form variable to the same and it worked fine. This is why I hate taking an app that was originally written in SQL and coding it for Access.
Bruce -----Original Message----- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 03, 2007 8:35 PM To: CF-Talk Subject: Re: Pulling my hair out on a query heh. this exact question was posted on the Adobe forums. apparently, 'password' is a reserved word in Access. i couldn't find it on the reserved word list, but the original poster said after enclosing the word Password in square brackets, the query worked. INSERT INTO clients (Client_Name, Login, [Password]) ... On 1/3/07, Bruce Sorge <[EMAIL PROTECTED]> wrote: > I am pulling my hair out with this stupid INSERT query. Here is the query: > > <cfquery datasource="#Application.dsn#"> > INSERT INTO Clients > (Client_Name, Login, Password) > VALUES ('#Form.Client_Name#', '#Form.Login#', '#Form.Password#') > </cfquery> > > Very basic. I am getting the message Syntax Error in INSERT query. Here is > what the query looks like after the post: > > INSERT INTO Clients (Client_Name, Login, Password) VALUES ('Ford', 'Ford', > 'password') > > I opened the database and copied and pasted the query and it worked like a > champ. I know the query is formed correctly, I mean it is a basic INSERT!! I > have tons of these all over the app that are working fine. > It is an MS Access DB (Clients wish, not mine). > > Thanks, > > Bruce > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265599 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

