Problem returning a cursor through ODBC to ASP layer from postgres

From: "david williams" <dw_remote(at)hotmail(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Problem returning a cursor through ODBC to ASP layer from postgres
Date: 2002-09-13 16:28:47
Message-ID: DAV57PC5yGpgdNpC2Ng00014cde@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 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

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Ben Trewern 2002-09-13 16:37:54 datetime and ODBC driver
Previous Message david williams 2002-09-13 15:37:37 How do I return a cursor thought the ODBC driver