> Hi,
> 
> How can I retrieve a "field" returned by a stored procedure?
> 
> SP:
> CREATE OR REPLACE FUNCTION common.testbytea_sel(Pid OID) RETURNS TEXT AS $$
> DECLARE
>         MyPic           BYTEA;
>         MyString        TEXT;
> BEGIN
>         SELECT pic INTO MyPic FROM common.testbytea WHERE id = Pid;
>         MyString = encode(MyPic, 'base64');
>         RETURN MyString;
> END;
> $$ LANGUAGE PLPGSQL STRICT SECURITY DEFINER;
> 
> GB:
> sqlQry = "SELECT * FROM common.testbytea_sel(" & RowNb & ");"
> resQry = $DBConn.Exec(sqlQry)
> 
> PB: what resQry!??? shall I ask for?
> 

You can access result fields by index too:

resQry[0], reqQry[1], ...

-- 
Benoît Minisini

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to