Here's the deal. I need to update a form. No big task right? Well I keep getting this error message and I suspect it's the date field giving me grief but can't figure it out. Please check my UPDATE query for syntax problems or anything else you might know. I'm using the following to populate a date field in the form. The pasing it on to the update query. Thanks.
<cfoutput query="Ticket_Detail">
<CFIF Ticket_Detail.UpdateDate IS "">
<cfinput name="UpdateDate" size="20" maxlength="20" value="#DateFormat(Now(),"mmmm d, yyyy"
#">
<cfelse>
<cfinput name="UpdateDate" size="20" maxlength="20" value="#DateFormat(Ticket_Detail.UpdateDate)#">
</cfif>
</cfoutput>
Here's my query.... Is SQL different from Access? That's what I suspect.
<CFQUERY NAME="Update_Tickets" DATASOURCE="HelpTest">
UPDATE tblTicketInformation
SET
AssignTo = '#FORM.AssignTo#',
TakenBy = '#FORM.TakenBy#',
Department = '#FORM.Department#',
Category = '#FORM.Category#',
Status = '#FORM.Status#',
Product = '#FORM.Product#',
Priority = '#FORM.Priority#',
UpdateDate = '#FORM.UpdateDate#',
UserLocation = '#FORM.UserLocation#',
UserName = '#FORM.UserName#',
UserPhone = '#FORM.UserPhone#',
UserEmail = '#FORM.UserEmail#',
UserStatus = '#FORM.UserStatus#',
Symptom = '#FORM.Symptom#',
Problem = '#FORM.Problem#',
Resolution = '#FORM.Resolution#',
Comments = '#FORM.Comments#'
Where TicketNumber = '#TicketNumber#'
</CFQUERY>
<!--- Use CFLOCATION to return to getopentickets.cfm --->
<CFLOCATION URL="getopentickets.cfm">
Thanks!
Sheryl
<cfoutput query="Ticket_Detail">
<CFIF Ticket_Detail.UpdateDate IS "">
<cfinput name="UpdateDate" size="20" maxlength="20" value="#DateFormat(Now(),"mmmm d, yyyy"
<cfelse>
<cfinput name="UpdateDate" size="20" maxlength="20" value="#DateFormat(Ticket_Detail.UpdateDate)#">
</cfif>
</cfoutput>
Here's my query.... Is SQL different from Access? That's what I suspect.
<CFQUERY NAME="Update_Tickets" DATASOURCE="HelpTest">
UPDATE tblTicketInformation
SET
AssignTo = '#FORM.AssignTo#',
TakenBy = '#FORM.TakenBy#',
Department = '#FORM.Department#',
Category = '#FORM.Category#',
Status = '#FORM.Status#',
Product = '#FORM.Product#',
Priority = '#FORM.Priority#',
UpdateDate = '#FORM.UpdateDate#',
UserLocation = '#FORM.UserLocation#',
UserName = '#FORM.UserName#',
UserPhone = '#FORM.UserPhone#',
UserEmail = '#FORM.UserEmail#',
UserStatus = '#FORM.UserStatus#',
Symptom = '#FORM.Symptom#',
Problem = '#FORM.Problem#',
Resolution = '#FORM.Resolution#',
Comments = '#FORM.Comments#'
Where TicketNumber = '#TicketNumber#'
</CFQUERY>
<!--- Use CFLOCATION to return to getopentickets.cfm --->
<CFLOCATION URL="getopentickets.cfm">
Thanks!
Sheryl