I am having an issue with trying to update an SQL table with this cfquery. Here is the code in cold fusion:
<CFSET dateTimes=DateFormat(Now(),"mm\dd\yyyy")>
<CFQUERY NAME="updateTime" DATASOURCE="#this_datasource#">
UPDATE users
SET ACTIVITYDATE = CAST(#dateTimes# AS smalldatetime)
WHERE username = '#Form.login_username#'
AND Password = '#Form.Password#'
</CFQUERY>
When trying to execute this it gives me this:
Error Executing Database Query. [Macromedia][SQLServer JDBC Driver] [SQLServer]Incorrect syntax near '\25'.
The error occurred on line 19.
Also another thing is the type of sal_var the ACTIVITYDATE is smalldatetime. I have also tried doing it without the cast and just doing the plain #dateTimes# var. I have also tried the cfqueryparam which also did not work. Thank you in advance for your help!