try not specifying the output
CREATE PROCEDURE getSRZip
(
@ZIP CHAR (5)
)
AS
DECLARE
@return_value INTEGER
BEGIN
SELECT
TERRITORY_TYPE,
ZIP,
EMAIL
FROM
V_TERRITORY_ALIGNMENT
WHERE
TERRITORY IS NOT NULL
AND
TERRITORY_ID != 114
AND
ZIP = @ZIP
END
RETURN(0)
Make your call like this
a: if you pass null="yes" to a stored proc, it ALWAYS SENDS NULL if
you need to conditionally send in null, this will work great
null="#IIF(trim(form.TERRITORY_ZIP) IS "", DE("Yes"),
DE("No"))#"
b: you can now look at your returncode by looking at
cfstoredproc.statuscode
<cfstoredproc procedure="getSRzip" datasource="LGDB" returncode="Yes">
<cfprocparam type="In" dbvarname="@ZIP" value="#form.TERRITORY_ZIP#"
cfsqltype="CF_SQL_CHAR">
<cfprocresult name="outzip">
</cfstoredproc>
-----Original Message-----
From: Greenberg, Lisa [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 2:11 PM
To: CF-Talk
Subject: cfstored procedure- NEWbie
[EMAIL PROTECTED]
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="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