Subject | Re: Stored Procedure Only Returning 1st row |
---|---|
Author | rfrieband |
Post date | 2005-03-27T18:50:10Z |
Hi Daniel,
EXECUTE and it wouldn't work, so I ended up calling it in ColdFusion
like so:
<cfstoredproc procedure = "PROC_FINDPT" DATASOURCE="#request.dsn#"
returnCode = "Yes">
<cfprocresult name="FindPt">
<cfprocparam type = "IN"
CFSQLType = CF_SQL_VARCHAR
value = "#form.lname#"
dbVarName = LNAME>
<cfprocparam type = "IN"
CFSQLType = CF_SQL_VARCHAR
value = "#form.fname#"
dbVarName = FNAME>
</cfstoredproc>
This worked but only returned the first record of the set. I am not
used to using a SELECT to call a stored procedure, but it does the job
here. I'm not sure why the above method doesn't work, but I'll just go
with SELECT if the results of the sp will be more than one record.
Thanks again.
Regards,
Roy F.
--- In firebird-support@yahoogroups.com, Daniel Rail <daniel@a...>
wrote:
> How is the SP called within ColdFusion?Thanks you so much. The SELECT syntax was the key. I was trying to use
> Are you using EXECUTE PROCEDURE PROC_FINDPT?
> Or, SELECT ... FROM PROC_FINDPT?
>
> Usually for a selectable stored procedure, you need to use
> SELECT ... FROM PROC_FINDPT(input params).
EXECUTE and it wouldn't work, so I ended up calling it in ColdFusion
like so:
<cfstoredproc procedure = "PROC_FINDPT" DATASOURCE="#request.dsn#"
returnCode = "Yes">
<cfprocresult name="FindPt">
<cfprocparam type = "IN"
CFSQLType = CF_SQL_VARCHAR
value = "#form.lname#"
dbVarName = LNAME>
<cfprocparam type = "IN"
CFSQLType = CF_SQL_VARCHAR
value = "#form.fname#"
dbVarName = FNAME>
</cfstoredproc>
This worked but only returned the first record of the set. I am not
used to using a SELECT to call a stored procedure, but it does the job
here. I'm not sure why the above method doesn't work, but I'll just go
with SELECT if the results of the sp will be more than one record.
Thanks again.
Regards,
Roy F.
--- In firebird-support@yahoogroups.com, Daniel Rail <daniel@a...>
wrote:
>
> How is the SP called within ColdFusion?
> Are you using EXECUTE PROCEDURE PROC_FINDPT?
> Or, SELECT ... FROM PROC_FINDPT?
>
> Usually for a selectable stored procedure, you need to use
> SELECT ... FROM PROC_FINDPT(input params).
>
> --
> Best regards,
> Daniel Rail
> Senior Software Developer
> ACCRA Consultants Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.filopto.com)