BlogCFC Update

This post is more than 2 years old.

A user reported an issue with BlueDragon/MySQL. I was able to reproduce the issue. I used code like this:

,allowcomments =<cfqueryparam value="#arguments.allowcomments#" cfsqltype="CF_SQL_TINYINT">

Which worked fine under CFMX even when the value was a boolean. In BD, it seems as if the queryparam was a bit stricter, which seems to make sense. So I simply added this code (where applicable):

<cfif arguments.allowcomments>
   <cfset arguments.allowcomments = 1>
   <cfset arguments.allowcomments = 0>

As a warning - watch those queryparams if building code that needs to run both on CFMX and BD. I won't say one is wrong and one is right - but there are definitely differences. Luckily, I've been able to tweak things to run nicely on both platforms w/o using any "hacks."

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Brian posted on 6/8/2005 at 7:29 PM

Thanks for the fix!

Comment 2 by Michael Schmidt posted on 6/8/2005 at 8:21 PM

>> I won't say one is wrong and one is right

Of course one is right CFMX is the real thing and BD is the non-perfect copy.

Comment 3 by Raymond Camden posted on 6/8/2005 at 9:01 PM

Well, I don't know. I think I found 3 issues w/ queryparam, and in 2 of the cases it seemed like BD was being more precise, which I think is a good thing. In one case it was more vague as to why BD acted differently.