Hi,
I have read some of the other posts on this and none of them have seemed to help me so I am hoping someone can tell me specifically what I am doing wrong in my own code.
First off I have a date field that I am pulling from a database by the ID of the table. Then I want the user to be able to change the date and re-submit it back to the database. Sounds simple...
This is my update query...
<cfquery datasource="DATES">
UPDATE DATES
SET DATE = #Form.DATE#>
WHERE ID = "#Form.ID#"
</cfquery>
This is my form....
input type="text" name="DATE" value="#DateFormat#" />
and this is what is generating the value in the form...
<cfquery name="getInfo" datasource="DATES">
SELECT * FROM DATES
WHERE ID = #URL.ID#
</cfquery>
It is pulling the date from the database in its format displaying it to the user allowing them to change it and putting it back in the database. I have tried every formatting method under the son to get this to work but All i ever get is "Syntax error in UPDATE statement. " but it sees the format just fine (SQL UPDATE DATES SET DATE = 2008-02-12 00:00:00.0> WHERE ID = "1")
Anyone know what could be wrong
I have read some of the other posts on this and none of them have seemed to help me so I am hoping someone can tell me specifically what I am doing wrong in my own code.
First off I have a date field that I am pulling from a database by the ID of the table. Then I want the user to be able to change the date and re-submit it back to the database. Sounds simple...
This is my update query...
<cfquery datasource="DATES">
UPDATE DATES
SET DATE = #Form.DATE#>
WHERE ID = "#Form.ID#"
</cfquery>
This is my form....
input type="text" name="DATE" value="#DateFormat#" />
and this is what is generating the value in the form...
<cfquery name="getInfo" datasource="DATES">
SELECT * FROM DATES
WHERE ID = #URL.ID#
</cfquery>
It is pulling the date from the database in its format displaying it to the user allowing them to change it and putting it back in the database. I have tried every formatting method under the son to get this to work but All i ever get is "Syntax error in UPDATE statement. " but it sees the format just fine (SQL UPDATE DATES SET DATE = 2008-02-12 00:00:00.0> WHERE ID = "1")
Anyone know what could be wrong