Re: ODBC, Stored Procedures ,Cold Fusion...
Posted in 1998
Kate Juliff wrote:
>
> I am hoping to find someone who has used stored procedures in Informix
> and executed them from Cold Fusion. I know that CF cannot pick up the
> return value, but had hoped I could somehow get the results of a select
> statement in an Informix SP from CF.
>
> As I understand it, if an MSQL stored procedure is executed from CF,
> then, if the procedure containd a select statement, the results of the
> select are passed to CF. However, with Informix, a select (as opposed
> to a "select into") statement is not available in a SP and so I cannot
> use a select statement to pass results to CF.
>
> If anyone at all has used Informix SPs with CF, I'd really appreciate
> them getting in touch.
>
> Thanks,
>
> Kate Juliff
Hi Kate,
at the moment I'm a bit confused what you really want. Do you need
the return value of a Stored Procedure in your application ?
SELECT spname() INTO variable FROM systables where tabid=1;
This would execute your Stored Procedure "spname()" and would
store the result into your variable. I think somehow this will work
in your Cold Fusion environment, too. Maybe you will not need
the variable, but the SELECT statement's NAME. Problem: The
Stored Procedure must return a single result and must not
return a result set.
Or do you want to store a select-statement's result into a
Stored Procedure variable ?
create procedure spname()define var1 int;
foreach select whatever INTO var1 from yourtable
-- if you want to return the value ???
return var1; -- if you have more than one row,
-- add "with resume" after the
-- return var1
end foreach;
end procedure;
Bye
Stefan Weideneder