• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Update query results

New Here ,
Apr 17, 2013 Apr 17, 2013

Copy link to clipboard

Copied

The following code snippet behaves differently on CF10 versus previous versions.

<CFOUTPUT>ColdFusion version is #Server.ColdFusion.ProductVersion# <BR></CFOUTPUT>

<CFQUERY NAME="RS" DATASOURCE="MyDS">

SELECT CURRDUMPDATE FROM MISCVALUES WHERE ID = 1

</CFQUERY>

<CFOUTPUT>#RS.CURRDUMPDATE# <BR></CFOUTPUT>

<CFSET RS.CURRDUMPDATE = UCase(DateFormat(RS.CURRDUMPDATE,"YYYY-MMM-DD"))>

<CFOUTPUT>#RS.CURRDUMPDATE# <BR></CFOUTPUT>

Results are shown as follows:

ColdFusion version is 9,0,1,274733
2013-04-17 00:00:00.0
2013-APR-17

ColdFusion version is 10,0,5,283319
2013-04-17 00:00:00.0
2013-04-17 00:00:00.0

Whether this is best practice or isn’t the issue but the issue is the unexpected behavior change in CF10.  Of course I can adjust the code and change how I code this in the future but the added work checking existing applications isn't appreciated.  Bug or intentional change it does make us weary about what else might be lurking in CF10 that might break our apps.

Database is Oracle, it is what we use and changing databases to account for CF10 behavior changes isn't practical.

Any way to restore the previous behavior of earlier CF versions to CF10?

Views

414

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 17, 2013 Apr 17, 2013

Copy link to clipboard

Copied

LATEST

I've found that the higher the cf version, the less tolerent it is of less than perfect code.  I also find it annoying.  My opinion is that any problems with the code should have been apparent when I wrote it.  Then I could have done something about it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation