Hey everyone. I am working with sql server, and I am trying to match a date
to update a record. Here is what I have:
<cfquery name="qcfAddEventDates" datasource="FSLibrary_Dev">
UPDATE dbo.tbl_EP_EventDateTime
SET EventDateStartTime = #local.startTime#,
EventDateEndTime =
#local.endTime#, EventScheduleNotes = '#Trim(form.dateNotes)#'
WHERE EventID = #Trim(form.ID)#
AND DatePart(DD, EventDate) = DatePart(DD,
#Trim(form.Date)#)
AND DatePart(MM, EventDate) = DatePart(MM,
#Trim(form.Date)#)
</cfquery>
I also tried:
<cfquery name="qcfAddEventDates" datasource="FSLibrary_Dev">
UPDATE dbo.tbl_EP_EventDateTime
SET EventDateStartTime = #local.startTime#,
EventDateEndTime =
#local.endTime#, EventScheduleNotes = '#Trim(form.dateNotes)#'
WHERE EventID = #Trim(form.ID)#
AND EventDate = #Trim(form.Date)#
</cfquery>
The problem is that it won't match any records. I know the record is in the
database, because I checked to make sure. Any ideas why this doesn't work?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists