From: david williams <dw_remote@hotmail.com>
To: pgsql-odbc@postgresql.org
Subject: Problem returning a cursor through ODBC to ASP layer from postgres
Date: Fri, 13 Sep 2002 12:28:47 -0400
Message-ID: <DAV57PC5yGpgdNpC2Ng00014cde@hotmail.com> (raw)
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 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:
<%
strconn="DSN=p_test;uid=postgres;pwd="
mySQL = "begin "&vbcrlf
mySQL = mySQL & "select getallusers('rs'); "
mySQL = mySQL & "fetch all in rs; "
mySQL = mySQL & "commit; "
call query2table(mySQL,strconn)
%>
This does not seem to return anything.
Thanks
!-------------------------------------!
David WilliamsGet more from the Web. FREE MSN Explorer download : http://explorer.msn.com
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: dw_remote@hotmail.com
Subject: Re: Problem returning a cursor through ODBC to ASP layer from postgres
In-Reply-To: <DAV57PC5yGpgdNpC2Ng00014cde@hotmail.com>
References: <DAV57PC5yGpgdNpC2Ng00014cde@hotmail.com>
* 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