1 Reply Latest reply on Apr 17, 2013 2:37 PM by Dan Bracuk

    Update query results

    bridge

      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?

        • 1. Re: Update query results
          Dan Bracuk Level 5

          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.