<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>newschuyl - ColdFusion</title>
			<link>http://www.mischefamily.com/nathan/index.cfm</link>
			<description>a blog by nathan mische</description>
			<language>en-us</language>
			<pubDate>Mon, 06 Sep 2010 20:16:56-0400</pubDate>
			<lastBuildDate>Fri, 13 Aug 2010 11:28:00-0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>nmische@gmail.com</managingEditor>
			<webMaster>nmische@gmail.com</webMaster>
			
			<item>
				<title>ImageCrop: The rectangular crop area must not be outside the image</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2010/8/13/ImageCrop-The-rectangular-crop-area-must-not-be-outside-the-image</link>
				<description>
				
				Today I was resizing and cropping some images with ColdFusion when I ran into the following issue. After resizing the image using ImageScaleToFit(), ImageCrop() would throw an error stating that &quot;The rectangular crop area must not be outside the image.&quot; I was able to confirm that the crop area was not outside of the image, so I was a little perplexed. Then I found the following listed as a &lt;a href=&quot;http://java.sun.com/products/java-media/jai/jai-bugs.html&quot;&gt;known JAI bug&lt;/a&gt;:  [More]
				</description>
				
				<category>ColdFusion</category>				
				
				<category>Java</category>				
				
				<pubDate>Fri, 13 Aug 2010 11:28:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2010/8/13/ImageCrop-The-rectangular-crop-area-must-not-be-outside-the-image</guid>
				
			</item>
			
			<item>
				<title>WebSockets with ColdFusion</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2010/7/28/WebSockets-with-ColdFusion</link>
				<description>
				
				Today I released a &lt;a href=&quot;http://github.com/nmische/cf-websocket-gateway&quot;&gt;ColdFusion WebSocket Gateway&lt;/a&gt; on &lt;a href=&quot;http://websocketgateway.riaforge.org/&quot;&gt;RIAForge&lt;/a&gt; and &lt;a href=&quot;http://github.com/nmische/cf-websocket-gateway&quot;&gt;Github&lt;/a&gt;. The name pretty much says it all. It is a event gateway for messaging between ColdFusion and conforming clients via the WebSocket protocol. The gateway is based on &lt;a href=&quot;http://github.com/TooTallNate/Java-WebSocket&quot; target=&quot;_blank&quot;&gt;Nathan Rajlich&apos;s Java-WebSocket&lt;/a&gt; server implementation, which I updated to support both WebSocket draft 75 and draft 76 clients. For more info on how to install and use this gateway see the &lt;a href=&quot;http://wiki.github.com/nmische/cf-websocket-gateway/&quot;&gt;Github wiki page&lt;/a&gt;.  [More]
				</description>
				
				<category>JavaScript</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Wed, 28 Jul 2010 21:47:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2010/7/28/WebSockets-with-ColdFusion</guid>
				
			</item>
			
			<item>
				<title>OpenID4CF Updated To Fix Potential Security Issue</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2010/7/18/OpenID4CF-Updated-To-Fix-Potential-Security-Issue</link>
				<description>
				
				Last week I gave a 30 minute introduction to &lt;a href=&quot;http://openid.net&quot;&gt;OpenID&lt;/a&gt; at our monthly developer tech talk lunch. Soon after the talk my co-worker &lt;a href=&quot;http://www.peregrinesalon.com/&quot;&gt;Tim Allen&lt;/a&gt; sent me &lt;a href=&quot;http://www.computerworld.com/s/article/9179224/Researchers_Authentication_crack_could_affect_millions&quot;&gt;this article&lt;/a&gt; on a recently discovered security vulnerability in most open source OpenID implementations.

I was particularly interested because I maintain &lt;a href=&quot;http://openid4cf.riaforge.org/&quot;&gt;OpenID4CF&lt;/a&gt;, which is based on the &lt;a href=&quot;http://code.google.com/p/openid4java/&quot;&gt;OpenID4Java&lt;/a&gt; library. So I did a little more research into the issue and asked about it on the OpenID4Java mailing list. As it turns out OpenID4Java is potentially vulnerable to this attack, but a user on the list was able to give some advice on how to patch the library based on a fix committed to &lt;a href=&quot;http://code.google.com/p/jopenid/&quot;&gt;JOpenID&lt;/a&gt;. 

Now I don&apos;t really know how exploitable this vulnerability is, but given how simple the fix was I went ahead and &lt;a href=&quot;http://openid4cf.riaforge.org/index.cfm?event=page.svnchangelist&amp;revision=7&quot;&gt;patched&lt;/a&gt; the fork of OpenID4Java I package for OpenID4CF and posted it to RIAForge. Hopefully OpenID4Java will be patched shortly, but in the meantime you can use the version I include with OpenID4CF if you want to protect against this potential vulnerability. 
				</description>
				
				<category>Security</category>				
				
				<category>ColdFusion</category>				
				
				<category>Java</category>				
				
				<pubDate>Sun, 18 Jul 2010 13:36:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2010/7/18/OpenID4CF-Updated-To-Fix-Potential-Security-Issue</guid>
				
			</item>
			
			<item>
				<title>Listening for CFTREE data loaded events</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2010/5/28/Listening-for-CFTREE-data-loaded-events</link>
				<description>
				
				Last week &lt;a href=&quot;http://www.coldfusionjedi.com&quot;&gt;Ray Camden&lt;/a&gt; asked if it was possible to listen for data loaded events with CFTREE. I had &lt;a href=&quot;http://www.mischefamily.com/nathan/index.cfm/2007/6/4/ColdFusion-8--Tapping-Into-the-Power-of-the-YUI&quot;&gt;done some work with CFTREE&lt;/a&gt; in the past and I knew something like this should be possible. After some quick investigation I put together a quick and dirty example to show how you could be notified when new nodes are loaded for a tree.  [More]
				</description>
				
				<category>JavaScript</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Fri, 28 May 2010 08:50:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2010/5/28/Listening-for-CFTREE-data-loaded-events</guid>
				
			</item>
			
			<item>
				<title>Adobe ColdFusion Anthology</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2010/4/30/Adobe-ColdFusion-Anthology</link>
				<description>
				
				Just a quick post to let people know that the &lt;a href=&quot;http://amzn.com/1430272155&quot; target=&quot;_blank&quot;&gt;&lt;i&gt;Adobe ColdFusion Anthology&lt;/i&gt;&lt;/a&gt; was released today by Apress. The book has tons of excellent content from the Fusion Authority Quarterly Update, including my article &quot;Web Services and Complex Types.&quot; 
				</description>
				
				<category>ColdFusion</category>				
				
				<pubDate>Fri, 30 Apr 2010 12:12:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2010/4/30/Adobe-ColdFusion-Anthology</guid>
				
			</item>
			
			<item>
				<title>OpenID And ColdFusion</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2010/4/16/OpenID-And-ColdFusion</link>
				<description>
				
				Recently I wanted to investigate building an OpenID identity provider in ColdFusion. While there are a few OpenID consumer libraries out there, I didn&apos;t really find any ColdFusion implementations for an OpenID server. Plus, given that OpenID is an authentication protocol there are heightened security considerations, so I wanted something that was well tested and widely used. This lead me to the &lt;a href=&quot;http://code.google.com/p/openid4java/&quot;&gt;OpenID4Java&lt;/a&gt; project. Looking at the documentation and source for the project there appeared to be pretty straight forward implementations for both an OpenID provider and consumer via the ServerManager and ConsumerManager classes so I began to port the sample JSP applications over to ColdFusion. That is were my problems began.  [More]
				</description>
				
				<category>Security</category>				
				
				<category>ColdFusion</category>				
				
				<category>Java</category>				
				
				<pubDate>Fri, 16 Apr 2010 12:46:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2010/4/16/OpenID-And-ColdFusion</guid>
				
			</item>
			
			<item>
				<title>CF No Debug 1.3</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2010/3/4/CF-No-Debug-13</link>
				<description>
				
				The CF No Debug Firefox extension has been updated to work with Firefox 3.6. You can get the latest from &lt;a href=&quot;http://cfnodebug.riaforge.org&quot; target=&quot;_blank&quot;&gt;RIAForge&lt;/a&gt;. 
				</description>
				
				<category>Tools</category>				
				
				<category>CF No Debug</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Thu, 04 Mar 2010 15:50:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2010/3/4/CF-No-Debug-13</guid>
				
			</item>
			
			<item>
				<title>CF Debug Copy for Firefox Update</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2010/1/27/CF-Debug-Copy-for-Firefox-Update</link>
				<description>
				
				Just a quick post to let people know my &lt;a href=&quot;http://cfdebugcopy.riaforge.org&quot; target=&quot;_blank&quot;&gt;CF Debug Copy for Firefox&lt;/a&gt; extension has been updated to work with Firefox 3.6. You can download the latest from &lt;a href=&quot;http://cfdebugcopy.riaforge.org&quot; target=&quot;_blank&quot;&gt;RIAForge&lt;/a&gt;. 
				</description>
				
				<category>ColdFusion</category>				
				
				<pubDate>Wed, 27 Jan 2010 21:40:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2010/1/27/CF-Debug-Copy-for-Firefox-Update</guid>
				
			</item>
			
			<item>
				<title>CFBuilder DocShare Support</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2009/12/7/CFBuilder-DocShare-Support</link>
				<description>
				
				A few weeks ago Terry Ryan released his &lt;a href=&quot;http://www.terrenceryan.com/blog/post.cfm/instant-code-review-coldfusion-builder-extension&quot;&gt;Instant Code Review ColdFusion Builder Extension&lt;/a&gt;. I realize that the point of the extension was to get people to think of creative uses of CF Builder extensions, but I couldn&apos;t help but think that there are much better ways of collaborating using the Eclipse platform, specifically the &lt;a href=&quot;http://wiki.eclipse.org/DocShare_Plugin&quot;&gt;Eclipse Communication Framework (ECF) DocShare plug-in&lt;/a&gt;.

Unfortunately ColdFusion Builder&apos;s CFML Editor doesn&apos;t support the plug-in out of the box. Fortunately the DocShare plug-in developers did the Eclipse thing and &lt;a href=&quot;http://wiki.eclipse.org/Extending_Real-Time_Shared_Editing_for_Use_with_Other_Editors&quot;&gt;made it easy to extend the plug-in to support other editors&lt;/a&gt;. So I put together an Eclipse plug-in that adds DocShare support to the CFBuilder CFML editor. You can check out the &lt;a href=&quot;http://cfbdocshare.riaforge.org/&quot;&gt;CFBuilder DocShare Support&lt;/a&gt; plug-in at RIAForge.

A few notes about the plug-in. First, you will need to install ECF, including the DocShare plugin. For update URLs for your version of Eclipse see the &lt;a href=&quot;http://www.eclipse.org/ecf/downloads.php&quot;&gt;ECF site&lt;/a&gt;. Second, my plug-in just enables the &quot;Share This Editor With...&quot; context menu item in the CF Builder CFML editor, the actual editor sharing is implemented via the ECF DocShare plug-in. For more info on the DocShare plug-in and its use see the &lt;a href=&quot;http://wiki.eclipse.org/DocShare_Plugin&quot;&gt;DocShare Plugin&lt;/a&gt; site. Finally, I&apos;ve had I&apos;ve had hit and miss luck with the DocShare plugin, so be sure you have a backup of the file you plan to work on in shared editor.

Enjoy! 
				</description>
				
				<category>Tools</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Mon, 07 Dec 2009 21:40:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2009/12/7/CFBuilder-DocShare-Support</guid>
				
			</item>
			
			<item>
				<title>SQL Injection Consideration</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2009/11/5/SQL-Injection-Consideration</link>
				<description>
				
				Here is something I discovered the other day that surprised me a bit. ColdFusion data sources have an advanced option named &quot;Allowed SQL&quot; which, according to the documentation, defines &quot;the SQL operations that can interact with the current data source.&quot; I know some shops use this setting to help protect against SQL injection attacks. For example they may limit a data source to only allow SELECT and Stored Procedures. While you may think that this would go a long way toward protecting the data source against SQL injection, this may not be the case. If the database credentials used for the data source have additional permissions these statements may be executed via SQL injection. For example, consider the following setup:

&lt;ul&gt;
    &lt;li&gt; A SQL Server database: TESTDB
    &lt;li&gt; A table TESTDB.TestTable
    &lt;li&gt; A database user test_user with SELECT, INSERT, UPDATE, and DELETE permissions to TestTable
    &lt;li&gt; A ColdFusion data source &quot;test&quot; connected to TESTDB using the test_user credentials and the Allowed SQL option set to only SELECT and Stored Procedures.
&lt;/ul&gt;

&lt;img src=&quot;http://www.mischefamily.com/nathan/images/AllowedSQL.png&quot;&gt;

Now, consider the following query.
&lt;code&gt;
&lt;cfquery name=&quot;getItems&quot; datasource=&quot;test&quot;&gt;
    SELECT * FROM TestTable WHERE TestID = #url.testID#
&lt;/cfquery&gt;
&lt;/code&gt;

You may think the above query would be protected against SQL injection because the data source limits the Allowed SQL to SELECT and Stored Procedures, but you would be wrong. Given this setup, the above this code is actually susceptible to SQL injection. Assuming this query were in a template index.cfm, you could easily delete all records in TestTable by issuing a request like index.cfm?testID=1%20DELETE%20FROM%20TestTable.

Now there are a number of ways you could protect against this attack, one of the easiest being the cfqueryparam tag, another being to limit the database user&apos;s permissions, but that isn&apos;t the point of this post. The point is you can&apos;t rely on the Allowed SQL advanced option to protect against SQL injection. You have been warned. (Note: I have only tested this against MS SQL Server so it may not apply to all database engines.) 
				</description>
				
				<category>Security</category>				
				
				<category>SQL</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Thu, 05 Nov 2009 17:59:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2009/11/5/SQL-Injection-Consideration</guid>
				
			</item>
			
			<item>
				<title>Data-Centric Development with ColdFusion 9 and Flash Builder 4</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2009/10/27/DataCentric-Development-with-ColdFusion-9-and-Flash-Builder-4</link>
				<description>
				
				The second part of my Data-Centric Development with ColdFusion 9 and Flash Builder 4 tutorial is up on DZone. This tutorial builds on the project introduced in part one of the series and covers the new paging and client-side data management features available in Flash Builder 4. 

&lt;a href=&quot;http://ria.dzone.com/articles/flash-remoting-coldfusion-part2&quot; target=&quot;_blank&quot;&gt;Data-Centric Development with ColdFusion 9 and Flash Builder 4 - Part 2
&lt;/a&gt;

If you want to find out even more about these seriously cool features be sure to check out the following links:

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://help.adobe.com/en_US/Flex/4.0/html/WSc64e9ead1f0e66f01461ea43120da38f3b6-8000.html&quot; target=&quot;_blank&quot;&gt;Adobe Flex 4: Accessing data with Flex&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://help.adobe.com/en_US/Flex/4.0/html/WS537d51d90f827e7779748cff12133ecc866-8000.html&quot; target=&quot;_blank&quot;&gt;Adobe Flex 4: Tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://sujitreddyg.wordpress.com/2009/06/08/client-side-data-management-using-flash-builder-4/&quot; target=&quot;_blank&quot;&gt;Client Side Data Management using Flash Builder 4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>Flex</category>				
				
				<pubDate>Tue, 27 Oct 2009 20:39:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2009/10/27/DataCentric-Development-with-ColdFusion-9-and-Flash-Builder-4</guid>
				
			</item>
			
			<item>
				<title>JSONUtil 1.1</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2009/10/26/JSONUtil-11</link>
				<description>
				
				Last year I put together &lt;a href=&quot;http://jsonutil.riaforge.org&quot;&gt;JSONUtil&lt;/a&gt; as a proof of concept solution to the issue of &lt;a href=&quot;http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=74140&quot;&gt;ColdFusion&apos;s implicit type conversion during JSON serialization&lt;/a&gt;. There were some issues with the 1.0 release, and I&apos;ve had a few people submit patches, but because I had considered the project an experiment I didn&apos;t really take the time to update the official release.

Well, last week I was working on an AJAX project where I was making XHR requests to ColdSpring remote proxies using ColdFusion&apos;s built in JSON return format when I began running into issues with implicit type conversion. Specifically I had a method that should have returned a query with string values, however numeric strings were getting converted to decimal numbers. (For example the string &quot;001&quot; was being converted to number 1.0.) Because I was already using ColdSpring to generate the proxies I decided to put together a JSONUtil based ColdSpring advice component to handle the serialization. The advice turned out being so handy I thought I&apos;d package it up and include it in the JSONUtil release.  [More]
				</description>
				
				<category>JSONUtil</category>				
				
				<category>JavaScript</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Mon, 26 Oct 2009 12:48:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2009/10/26/JSONUtil-11</guid>
				
			</item>
			
			<item>
				<title>Another CFScript Query Gotcha</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2009/10/15/Another-CFScript-Query-Gotcha</link>
				<description>
				
				There have been a &lt;a href=&quot;http://www.bennadel.com/blog/1681-Learning-ColdFusion-9-Extending-The-Query-cfc-Service-Component.htm&quot;&gt;few&lt;/a&gt; &lt;a href=&quot;http://www.coldfusionjedi.com/index.cfm/2009/9/29/Gotches-with-Queries-in-Script&quot;&gt;issues&lt;/a&gt; reported with using the new &lt;a href=&quot;http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-7ffb.html&quot;&gt;Query component&lt;/a&gt; from cfscript and today I ran into another. Well actually I had a &lt;a href=&quot;http://fusiongrokker.com/&quot;&gt;co-worker&lt;/a&gt; ask about it, but it still led me to look into the issue. (Little did I know he was researching his own blog post on this. Sorry for stealing your post Adam.) Anyway, my co-worker was trying to run a Query of Queries in cfscript. Here is an example:

&lt;pre&gt;
&lt;code&gt;
&lt;cfscript&gt;
    //create an empty query to work with
    qryFoo = queryNew(&quot;a,b,c&quot;,&quot;varchar,varchar,varchar&quot;);

    //add a row and fill it with some data
    queryAddRow(qryFoo);
    querySetCell(qryFoo,&quot;a&quot;,&quot;aaaaaa&quot;);
    querySetCell(qryFoo,&quot;b&quot;,&quot;aaaaaa&quot;);
    querySetCell(qryFoo,&quot;c&quot;,&quot;aaaaaa&quot;);

    writeDump(var=qryFoo, label=&quot;qryFoo&quot;);
   
    qryFoo2 = new query(dbtype=&quot;query&quot;, sql=&quot;select a, &apos;bbbbb&apos; as b, &apos;ccccc&apos; as c from qryFoo&quot;);
    result = qryFoo2.execute();

    writeDump(var=result, label=&quot;qryFoo2&quot;);
&lt;/cfscript&gt;
&lt;/code&gt;
&lt;/pre&gt;

This code resulted in the following error:

&lt;blockquote&gt;
Error Executing Database Query.

Query Of Queries runtime error.
Table named qryFoo was not found in memory. The name is misspelled or the table is not defined.
&lt;/blockquote&gt;

At first I was a bit baffled, but when I thought about it for a minute it actually made perfect sense. &lt;a href=&quot;http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-8000.html&quot;&gt;The script functions implemented as CFCs&lt;/a&gt; are just the plain old CFML tags wrapped in components. That means when the cfquery tag actually executes it does so within the context and scope of the component function, not the calling page. To help illustrate the issue consider the following component:

&lt;pre&gt;
&lt;code&gt;
&lt;!--- sample.cfc ---&gt;
&lt;cfcomponent&gt;
    &lt;cffunction name=&quot;doDump&quot;&gt;    
        &lt;cfdump var=&quot;#myVar#&quot; /&gt;        
    &lt;/cffunction&gt;
&lt;/cfcomponent&gt;
&lt;/code&gt;
&lt;/pre&gt;

You wouldn&apos;t really expect the following code to work and it won&apos;t. You will get an error stating that myVar is undefined:

&lt;pre&gt;
&lt;code&gt;
&lt;cfset myVar = &quot;This is a test.&quot; /&gt;
&lt;cfset CreateObject(&quot;component&quot;,&quot;sample&quot;).doDump() /&gt;
&lt;/code&gt;
&lt;/pre&gt;

That is basically what is going on with the query of queries example above. One workaround I thought of would be to put the original query in a scope the CFC can access, say the request scope:

&lt;pre&gt;
&lt;code&gt;
&lt;cfscript&gt;
    //create an empty query to work with
    request.qryFoo = queryNew(&quot;a,b,c&quot;,&quot;varchar,varchar,varchar&quot;);

    //add a row and fill it with some data
    queryAddRow(request.qryFoo);
    querySetCell(request.qryFoo,&quot;a&quot;,&quot;aaaaaa&quot;);
    querySetCell(request.qryFoo,&quot;b&quot;,&quot;aaaaaa&quot;);
    querySetCell(request.qryFoo,&quot;c&quot;,&quot;aaaaaa&quot;);

    writeDump(var=request.qryFoo, label=&quot;qryFoo&quot;);
   
    qryFoo2 = new query(dbtype=&quot;query&quot;, sql=&quot;select a, &apos;bbbbb&apos; as b, &apos;ccccc&apos; as c from request.qryFoo&quot;);
    result = qryFoo2.execute();

    writeDump(var=result, label=&quot;qryFoo2&quot;);
&lt;/cfscript&gt;
&lt;/code&gt;
&lt;/pre&gt;

This works, but it is obviously less than ideal. Given all of the issues with the current Query.cfc I&apos;m really hoping Adobe can come up with a better solution for full cfscript support in the next version of CF.

&lt;h3&gt;Update&lt;/h3&gt;

Adam Cameron pointed out another solution in the comments below. Apparently you can use the setAttributes method of the Query object to set arbitrary attributes. I didn&apos;t realize this as the documentation states that this method supports &quot;all attributes supported by the cfquery tag.&quot; But if you look at the implementation for the method you can see it just adds any attributes to the variables scope of the component:

&lt;pre&gt;
&lt;code&gt;
public void function setAttributes()
		{
			if(!structisempty(arguments))
			{
				structappend(variables,arguments,&quot;yes&quot;);
			}
		}
&lt;/code&gt;
&lt;/pre&gt;


Here is a complete example using setAttributes:

&lt;pre&gt;
&lt;code&gt;
&lt;cfscript&gt;
    //create an empty query to work with
    qryFoo = queryNew(&quot;a,b,c&quot;,&quot;varchar,varchar,varchar&quot;);

    //add a row and fill it with some data
    queryAddRow(qryFoo);
    querySetCell(qryFoo,&quot;a&quot;,&quot;aaaaaa&quot;);
    querySetCell(qryFoo,&quot;b&quot;,&quot;aaaaaa&quot;);
    querySetCell(qryFoo,&quot;c&quot;,&quot;aaaaaa&quot;);

    writeDump(var=qryFoo, label=&quot;qryFoo&quot;);
   
    qryFoo2 = new query(dbtype=&quot;query&quot;, sql=&quot;select a, &apos;bbbbb&apos; as b, &apos;ccccc&apos; as c from qryFoo&quot;);
    qryFoo2.setAttributes(qryFoo=qryFoo);
    result = qryFoo2.execute();

    writeDump(var=result, label=&quot;qryFoo2&quot;);
&lt;/cfscript&gt;
&lt;/code&gt;
&lt;/pre&gt;


Note that there are thread-safety issues with this approach. If you do use setAttributes make sure you create a new instance of the service component for each service call. 
				</description>
				
				<category>ColdFusion</category>				
				
				<pubDate>Thu, 15 Oct 2009 22:20:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2009/10/15/Another-CFScript-Query-Gotcha</guid>
				
			</item>
			
			<item>
				<title>Data-Centric Development with ColdFusion 9 and Flash Builder 4</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2009/10/12/DataCentric-Development-with-ColdFusion-9-and-Flash-Builder-4</link>
				<description>
				
				I just posted the first of a two part tutorial over on DZone which walks through using some of the new data-centric development (DCD) features in Flash Builder 4 with ColdFusion 9. 

&lt;a href=&quot;http://ria.dzone.com/articles/flash-remoting-and-coldfusion&quot;&gt;Data-Centric Development with ColdFusion 9 and Flash Builder 4 - Part I&lt;/a&gt;

While Flash Builder is still in beta, the DCD features are very impressive and should simplify many ColdFusion/Flex work flows. Please check out the tutorial and let me know what you think. (And be sure to vote it up if you like it!) 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>Flex</category>				
				
				<pubDate>Mon, 12 Oct 2009 21:29:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2009/10/12/DataCentric-Development-with-ColdFusion-9-and-Flash-Builder-4</guid>
				
			</item>
			
			<item>
				<title>New ColdFusion Builder and Flex Builder Betas</title>
				<link>http://www.mischefamily.com/nathan/index.cfm/2009/10/5/New-ColdFusion-Builder-and-Flex-Builder-Betas</link>
				<description>
				
				In addition to today&apos;s release of &lt;a href=&quot;http://www.adobe.com/products/coldfusion/&quot;&gt;ColdFusion 9&lt;/a&gt;, ColdFusion Builder Beta 2 and Flex Builder 4 Beta 2 have been released on &lt;a href=&quot;http://labs.adobe.com/&quot;&gt;Adobe Labs&lt;/a&gt;. 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>Flex</category>				
				
				<pubDate>Mon, 05 Oct 2009 10:43:00-0400</pubDate>
				<guid>http://www.mischefamily.com/nathan/index.cfm/2009/10/5/New-ColdFusion-Builder-and-Flex-Builder-Betas</guid>
				
			</item>
			</channel></rss>