ColdFusion Casting QueryNew()

I haven’t been a big fan of QueryNew() but today I can across a scenario that could come handy.

But then, I ran into a issue that baffled me.  May be this issue has been addressed by Adobe but on ColdFusion 8, it’s a still there.

The Issue is. when the value is passed say the column type is not supported(something in that nature. I don’t remember the exact message.) But there are solutions for it.

Here is Adobe‘s workaround but as usual I wasn’t satisfied with that.

So after some more searching, I found a solution. It’s a casting issue and can be addressed by,
<cfset x = queryNew("foo,bar","integer,varchar") />

Read more from here.

Advertisements
ColdFusion Casting QueryNew()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s