return value from stored procedure

Darrin Thompson dthompson at characterlink.net
Wed Sep 13 10:53:42 EDT 2000


The return value from a procedure is handled like a parameter I think. 
Fetch_array only fetches datasets. Select creates datasets, that's why 
fetch_array worked. I don't know the procedure for handling output 
parameters off-hand or I would write it in for you.

Darrin

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 9/13/00, 2:04:50 AM, Sam Sam <s4m at lycos.com> wrote regarding [freetds] 
return value from stored procedure:


> Hello, =))
> I wrote a stored procedure which return some value on ms sql server 7.0 
my stored procedure is like this:
> CREATE PROCEDURE sam (@nilai char(1))
> if @nilai='A'
>   begin
>   return 1
>   end
> else
>   begin
>   return 0
>   end
> then i ran a query and fetch_array from php 4.0.1, it didn't return 
anything.. but if i change the return with select statement, it went 
alright.. any explanation on this ??

> thanks,
> sam




> Get your FREE Email and Voicemail at Lycos Communications at
> http://comm.lycos.com

> ---
> You are currently subscribed to freetds as: [dthompson at characterlink.net]
> To unsubscribe, forward this message to 
$subst('Email.Unsub')



More information about the FreeTDS mailing list