Re: Parameters.Refresh and RETURN setof TEXT
От | Hiroshi Inoue |
---|---|
Тема | Re: Parameters.Refresh and RETURN setof TEXT |
Дата | |
Msg-id | 44E71019.9080704@tpf.co.jp обсуждение исходный текст |
Ответ на | Parameters.Refresh and RETURN setof TEXT ("Rodney Franks" <rodney@careerjunction.co.za>) |
Список | pgsql-odbc |
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
В списке pgsql-odbc по дате отправления: