> If so, does that mean my only option is writing a custom tag to simulate > cfquery and having it handle all of that stuff the same way cfquery does? ( > Retrieve the datasource info from the adminapi, create and manage the > connection, call all of these execution methods and then translate their > results to a CFML query object, etc.
It is so, but I think the option of creating the custom tag is both mildly barmy and not the only option. A possible easier coding solution may be to create a component that builds and executes a cfquery by taking a java style prepared statement. A rough idea: <cfcomponent> <set variables.dsn = "" /> <cffunction name="init" ....>... init component and set datasource name</cffunction> <cffunction name="executePreparedStatement" returntype="query"> <cfargument name="statement" type="string" hint="eg. select * from foo where bar = ?" /> <cfargument name="params" type="array" hint="Array of structs with two keys, 'type' and 'value' /> <cfset var theQuery = "" /> <cfquery name="theQuery" datasource="#_dsn#"> ...// code to parse the statement and insert cfqueryparams in place of the '?'s </cfquery> <cfreturn theQuery /> </cffunction> </cfcompont> > What a hassle. This is worse than the fact that you can't use cfform > controls outside of a cfform tag in CFC cffunctions. I don't believe it makes sense for CF to be able to do what you are asking. Given a bare <cfqueryparam .../>, how is it to know what to do with it? Dominic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321706 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4