Skip to main content
Participating Frequently
May 9, 2018
Answered

ColdFusion 2018 - QueryExecute() - maxlength property without quotes

  • May 9, 2018
  • 10 replies
  • 2176 views

In the ColdFusion 2018 Public Beta with Update 1 applied, using Java 10.0.1 (rather than the default Java 9.0.4), when calling QueryExecute() and passing a struct of query params, if I use cfsqltype="CF_SQL_CHAR", maxlength=64 (note there is no double quotes around the 64) it throws an error. But if I instead use cfsqltype="CF_SQL_CHAR", maxlength="64" (note the 64 in double quotes) it works correctly.

Please investigate.

This topic has been closed for replies.
Correct answer Suresh Jayaraman

I am not a regular user of these community forums, and I clearly made a few mistakes in my post:

  • The key topic wasn't clear - my main issue is with the QueryExecute param evaluation throwing an error when quotes are not used around the maxlength parameter;
  • I had been assuming the issue was happening with Java 9.0.4 as well, but hadn't actually checked that (although it does still happen on the default Java 9.0.4 btw);
  • I should not have mentioned Java 10, knowing that it was not officially supported;
  • I didn't consider the broader community interpretation of my post, I was just flagging an issue I encountered for Adobe to investigate pre official release of CF2018;

My post to Adobe re Java 9/10/11 was just on the CF2018 pre-release blog post (you can see it *currently* at the end of the thread), and no they did not reply:

Public beta for Adobe ColdFusion (2018 release) and Adobe ColdFusion Builder (2018 release) | ColdFusion

In that context, I don't think the question is answered, because the issue still exists in the CF2018 Public Beta with Updater 1 applied.

Here is a code sample that can reproduce the issue:

<cfscript>

    qMyQuery = QueryExecute(" SELECT Test = :TestValue ", {TestValue = { cfsqltype="CF_SQL_CHAR", maxlength=64, value="Some text" }, { Datasource = "DataSource", Username = "UserName", Password = "Password" } );

    WriteDump(qMyQuery);

</cfscript>

I would like Adobe to look into this, or alternatively advise if quotes are now required in that context (they were not previously). Should I be posting issues that I have in the CF2018 Pre Release to another location rather than the Community Forums?


@Benjamin Reid

Thanks for reporting this . We figured out this is a regression caused due to changes made for data type preservation in CF 2018 and we have now fixed this . Regarding the official support for Java 10 for CF 2018 , the current plan is to support it even though we have shipped the installers with Java 9 JRE .. we are contemplating on switching to Java 10 .

BTW , even the Public beta build was certified in Java 10 before release so you are safe to continue to test with Java 10

10 replies

Charlie Arehart
Community Expert
Community Expert
May 9, 2018

Benjamin, first, note that CF2018 only supports Java 8 or 9.  See https://coldfusion.adobe.com/files/2018/04/Public_Beta_Support-Matrix.pdf , as is linked to from https://coldfusion.adobe.com/coldfusion-2018-public-beta/ . Look for "jdk" (not "java" or "jvm" or "jre"), to see the indication of that.

And yes, Adobe is aware that Java 10 is now out (and that Java 9 is no longer being updated, and that Java 11 is coming out in Sept).

Before we deride Adobe about this, note (I'm saying this for all readers) that both Java 9 and 10 had only VERY short lives. Java 9 was released Sep 2017 and updates ended in March 2018, and Java 10 then came out in March 2018 and support ends in Sep 2018. That's only 6 months each between release and end of updates! This is detailed at Oracle Java SE Support Roadmap.

I was writing up more on this matter as a reply here, about the current and likely future state of things, and it started getting long so I decided it would be better as a blog post. Check it out, for more:

On ColdFusion and its support for Java 9, 10, and 11

Comments welcome here or there.

/Charlie (troubleshooter, carehart. org)
WolfShade
Legend
May 9, 2018

Charlie,


Thank you for such an information packed entry.  I'm sure many will benefit from it.

V/r,

^ _ ^