Yes, the NOCOUNT may give you trouble. However, I noticed something else in
your sample code.
You are using #request.datasources# as your datasource for the query. If you
are referring to the http request, you could run into a problem if you decide
to put your function into a cfc. The cfc, since it runs on a remote server,
cannot see the http request. To get around this, I pass the datasource into
the function as a parameter like this:
<cffunction access="public" name="PURCHASE_ORDER_Select" output="false"
returntype="query" displayname="PURCHASE_ORDER_Select" hint="Calls
dbo.usp_PURCHASE_ORDER_Select">
<cfargument name="Purchase_Order_ID" default="0" type="Numeric"
required="no">
<cfargument name="datasource" default="prod" type="String"
required="no" />
<cfstoredproc procedure="usp_PURCHASE_ORDER_Select"
datasource="#datasource#" result="PURCHASE_ORDER" returncode="No" >
<cfprocparam dbvarname="Purchase_Order_ID" type="In"
cfsqltype="CF_SQL_INTEGER" value="#arguments.Purchase_Order_ID#" />
<cfprocresult name="qPurchaseOrder">
</cfstoredproc>
<cfreturn qPurchaseOrder>
</cffunction>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332596
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm