[thelist] Cold Fusion problem

rudy r937 at interlog.com
Mon Feb 12 11:26:29 CST 2001


> I'm having problems with an insert statement in one of my pages
> that is driving me nuts! I'm getting a "syntax error"
>
><CFQUERY NAME="insert" DataSource="book">
>    INSERT INTO tblBook
>    (item, author, pub, date, price, condition, format, cat, desc)
>    VALUES
>    ('#form.item#', '#form.author#', '#form.pub#', #form.date#,
>#form.price#, '#form.condition#', '#form.format#', '#form.cat#',
>'#form.desc#')
></CFQUERY>


hi robin

betcha a donut it's your use of the reserved word date for a column name

depending on your database, you can often get around this by referring to
the column as [date] or "date" but the surefire solution is to rename the
column

also, depending on your database, the date value that you insert using
#form.date# may give you trouble -- you may want to use the cf function
CreateODBCDate()


rudy.ca






More information about the thelist mailing list