I made a stored procedure that works great in the query analyzer. I do a
simple call to it with CF and it works fine. When I put it in a cfoutput
with the query defined I get 0 records back from the DB.
Thanks.
Here is some of the code
<cfquery name="dealers" datasource="#app.datasource#">
select id from dealers
where region = 'BP'
</cfquery>
<cfset dealernumber = ValueList(dealers.number, ',')>
<cfoutput query="dealers">
<cfstoredproc procedure="usp_region_dealer_date"
datasource="leadreports" debug="no" returncode="Yes">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="@CCRDCD" value="% #id#" null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_INTEGER"
dbvarname="@start" value="20010600" null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_INTEGER"
dbvarname="@end" value="20020100" null="No">
<CFPROCRESULT NAME="get_leadtotal">
</cfstoredproc>
#get_leadtotal.recordcount#<br>#id#
</cfoutput>
CREATE PROCEDURE usp_region_dealer_date
@CCRDCD varchar(255),
@start int,
@end int
AS
select *
from leads
where
ccrdcd like @CCRDCD and
cctrnd > @start and
cctrnd <@end
GO
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Can you call to a stored procedure in a cfloop and
> have it work right?
> Yes, as long as the procedure is called by cfquery or
> cfstoredproc tag.
>
> > Can you call to a stored procedure in a cfoutput with
> the query named
> > defined and have it work right?
> Yes, as long as the procedure is called by cfquery or
> cfstoredproc tag.
>
> What problems are you having?
>
> --
> Clint Tredway
> ----------------------------------
> Through Him, anything is possible.
> > Can you call to a stored procedure in a cfloop and have it work
right?
> > Can you call to a stored procedure in a cfoutput with the query
named
> > defined and have it work right?
> >
> > Trying to use stored procedures for the first time and they are
really
> > staring to tick me off. Grrrrrrrrr
> >
> > Thanks,
> >
> > Phillip Broussard
> > Tracker Marine Group
> > 417-873-5957
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists