tracker issue : CF-4198427

select a category, or use search below
(searches all categories and all time range)

CFUPDATE requires DATASOURCE parameter

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Kevin Krzyzanski / Kevin Krzyzanski ()

Created: 03/22/2017

Components: Tags

Versions: 2016,11.0

Failure Type: Others

Found In Build/Fixed In Build: 2016,0,03,300466 / 303781

Priority/Frequency: Normal /

Locale/System: / Windows 10 64 bit

Vote Count: 0

Problem Description:
Although CFQUERY and CFINSERT no longer require DATASOURCE to be defined, if it was defined in application.cfc, CFUPDATE still does.

Steps to Reproduce:

Define a datasource in application.cfc.  Attempt to use CFUPDATE without the datasource parameter to submit form changes.

Actual Result:


Expected Result:

No Error.

Any Workarounds:

Rewrite.  Submit SQL Update statement with CFQUERY.



I was checking the documentation of cfupdate and cfinsert [] [] and found that datasource attribute is optional for *cfinsert* but mandatory in *cfupdate* tag. Are there any specific reasons for it? Logically its mandatory while making DML operations but since it can be moved to Application.cfc, i think one of the tags made it optional.
Comment by Ashudeep S.
1038 | July 25, 2017 04:57:03 AM GMT