[Gambas-user] db retrieve
Jean-Yves F. Barbier
12ukwn at ...626...
Thu Nov 26 18:31:10 CET 2009
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?
--
Sorry, no fortune this time.
More information about the User
mailing list