ADO, set returning functions, ms acccess

From: "brian stapel" <brians_224(at)hotmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: ADO, set returning functions, ms acccess
Date: 2006-10-02 17:42:08
Message-ID: BAY107-W981B1A98A797D6C2F4B0CA11F0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Thanks for your time...

I've written a plpgsql function that produces a recordset (i think):

CREATE OR REPLACE FUNCTION "public"."function_name" (int integer) RETURNS SETOF "public"."tbl_nm" AS$body$/* New function body */DECLARE rec public.tbl_nm; BEGIN FOR rec IN select * from tbl_nm where id <> int LOOP RETURN NEXT rec; END LOOP; END;$body$LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;

When I execute the function from the sql editor, it produces the desired results. select * from function_name(1);

When I try to incorporate this function into my ado application, it doesn't seem to return a recordset.

Dim objCnn As ADODB.Connection Dim cmd As ADODB.Command Dim rs As ADODB.Recordset Set objCnn = data_layer.Open_ConnectPostGRESql(objCnn) Set cmd = New ADODB.Command cmd.ActiveConnection = objCnn cmd.CommandText = "Select * from function_name(1);" Set rs = cmd.Execute

rs record count is -1.

Can you help?

_________________________________________________________________
Express yourself - download free Windows Live Messenger themes!
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://imagine-msn.com/themes/vibe/default.aspx?locale=en-us&source=hmtagline

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Andreas 2006-10-03 02:26:37 Re: ADO, set returning functions, ms acccess
Previous Message Andrus 2006-09-29 17:59:48 Re: New release of psqODBC?