From: Hiroshi Inoue <inoue@tpf.co.jp>
To: rodney@careerjunction.co.za
Cc: pgsql-odbc@postgresql.org
Subject: Re: Parameters.Refresh and RETURN setof TEXT
Date: Sat, 19 Aug 2006 22:20:25 +0900
Message-ID: <44E71019.9080704@tpf.co.jp> (raw)
In-Reply-To: <005001c6c2f3$3e9ff670$332c13ac@careerjunction.local>
References: <005001c6c2f3$3e9ff670$332c13ac@careerjunction.local>
Rodney Franks wrote:
> Hi all,
> If I have a simple set returning function like 'aafunc1'
> ----------------------------------------------------------------
>
> CREATE OR REPLACE FUNCTION "public"."aafunc1" (v_acc integer) RETURNS SETOF text AS
> $body$
> BEGIN
> RETURN NEXT 'Arbitary_string of unlimitedLength.';
> RETURN NEXT 'Arbitary_string of unlimitedLength222222.';
> RETURN;
> END;
> $body$
> LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
> ----------------------------------------------------------------
>
> Which I then call using vbsrcipt, ADO & the postgresql odbc driver like this:-
>
> ----------------------------------------------------------------
> Set oCmd = CreateObject("ADODB.Command")
> With oCmd
> .ActiveConnection = oConnection
> .CommandType = 4 'adCmdStoredProc
> .CommandText = "public.aafunc1"
> .Parameters.Refresh()
> .Parameters("v_acc").Value = 1
> .Execute
> End With
> wscript.echo oCmd.Parameters(0)
> ----------------------------------------------------------------
>
> Why does it not work, it returns an error ...
> errmsg='ERROR: set-valued function called in context that cannot accept a set'
>
Hi Rodney,
Could you try the dll at
http://www.geocities.jp/inocchichichi/psqlodbc/index.html . ?
regards,
Hiroshi Inoue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: inoue@tpf.co.jp, rodney@careerjunction.co.za
Subject: Re: Parameters.Refresh and RETURN setof TEXT
In-Reply-To: <44E71019.9080704@tpf.co.jp>
References: <005001c6c2f3$3e9ff670$332c13ac@careerjunction.local> <44E71019.9080704@tpf.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox