I am trying to get a result set back from SQLSERVER using the following
stored procedure. I know I should get a recordcount > 0 ( I checked this in
Enter. Manager).  However when I execute this stored procedure the rowcount
I get a value of '0'.  What am I doing wrong?



<CFSETTING ENABLECFOUTPUTONLY="Yes">
<CFSTOREDPROC PROCEDURE="getSRzip" datasource="LGDB"  returncode="Yes"
debug="Yes">
<cfprocparam type="In" cfsqltype="CF_SQL_CHAR" dbvarname="@ZIP"
value="#form.TERRITORY_ZIP#" null="Yes"> 
<CFPROCPARAM TYPE="OUT" variable="territory_type" cfsqltype="CF_SQL_CHAR"
DBVARNAME=@territory_type>

<CFPROCRESULT name="outzip" resultset="1">
 </CFSTOREDPROC>
 <CFSETTING ENABLECFOUTPUTONLY="No">
<cfoutput>#outzip.RecordCount#</cfoutput>
<cfoutput query="outzip">#Territory_Type#<br>
</cfoutput>


CREATE PROCEDURE  getSRZip  (

 @ZIP CHAR (5),
 @TERRITORY_TYPE VARCHAR(15) OUTPUT)
 AS
SELECT TERRITORY_TYPE, 
                 ZIP,               
                EMAIL
FROM   V_TERRITORY_ALIGNMENT
WHERE TERRITORY != " "
AND TERRITORY_ID !=114 
AND ZIP =@ZIP


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to