How do I return a cursor thought the ODBC driver

From: "david williams" <dw_remote(at)hotmail(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: How do I return a cursor thought the ODBC driver
Date: 2002-09-13 15:37:37
Message-ID: DAV32YRUUODzHkSMmGB00011c1e@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

I have created a function in postgres called getallusers(var) that returns a cursor. This works fine at the psql level but when I try to return it through ODBC I get a variety of errors.

The function is as follows:

CREATE OR REPLACE FUNCTION getallusers(refcursor) RETURN refcursor AS'

begin
open $1 for select * from users;
return $1;
end;
' language 'plpgsql';

I call it like this at the psql level:

begin
select getallusers('rs');
fetch all in rs;
commit;

This works fine in psql as I mentioned but not when I try to query it through ODBC.

!-------------------------------------!
David WilliamsGet more from the Web. FREE MSN Explorer download : http://explorer.msn.com

Browse pgsql-odbc by date

  From Date Subject
Next Message david williams 2002-09-13 16:28:47 Problem returning a cursor through ODBC to ASP layer from postgres
Previous Message WZhang 2002-09-13 15:33:17 pgsql and pictures