Capture return value from a SQL statement
Hello all,
I would like to capture and display the return value of an SQL statement. Below given is the code:
<cfcomponent>
<cffunction name="addship" access="remote">
<cfquery name="shippers" datasource="northwindodbc" result="maxshipperid">
select max(shipperid) from shippers
</cfquery>
</cffunction>
</cfcomponent>
The above given SQL statement is returning the max shipperid which in this example has to be 3. How do I capture this return value on an external variable which can be accessed outside the cfquery statement.
Any quick response is highly appreciated.
Anil ![]()
