Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CBDED475D6E for ; Tue, 17 Sep 2002 05:43:13 -0400 (EDT) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 4F54F475B8C for ; Tue, 17 Sep 2002 05:43:08 -0400 (EDT) Received: (qmail 26638 invoked from network); 17 Sep 2002 09:43:09 -0000 Received: from unknown (HELO mcadnote1) (126.0.1.60) by sd2.tpf-fw-c.co.jp with SMTP; 17 Sep 2002 09:43:09 -0000 From: "Hiroshi Inoue" To: "david williams" Cc: Subject: Re: Problem returning a cursor through ODBC to ASP layer from postgres Date: Tue, 17 Sep 2002 18:43:40 +0900 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0071_01C25E7A.243A0B40" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/74 X-Sequence-Number: 2045 This is a multi-part message in MIME format. ------=_NextPart_000_0071_01C25E7A.243A0B40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit -----Original Message----- From: david williams Could you try the snapshot dll at http://w2422.nsk.ne.jp/~inoue/ ? regards, Hiroshi Inoue 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 Williams ---------------------------------------------------------------------------- -- Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ------=_NextPart_000_0071_01C25E7A.243A0B40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
-----Original Message-----
From: da= vid=20 williams

 Could you try the sna= pshot dll=20 at http://w2422.nsk.ne.jp/~inoue/&= nbsp;?
 
regards,
Hiroshi Inoue 
I have created a function in postgres called getallusers(var) that= =20 returns a cursor. This works fine at the psql level but when I try to ret= urn=20 it through ODBC I get errors.  
 
The function is as follows:
 
CREATE OR REPLACE FUNCTION getallusers(refcursor) RETURN refcursor= =20 AS'
 
begin
open $1 for select * from users;
return $1;
end;
' language 'plpgsql';
 
 
I call it like this:
 
<%
strconn=3D"DSN=3Dp_test;uid=3Dpostgres;pwd=3D"
mySQL = =3D "begin=20 "&vbcrlf
mySQL =3D mySQL & "select getallusers('rs'); "
myS= QL =3D=20 mySQL & "fetch all in rs; "
mySQL =3D mySQL & "commit; "
call query2table(mySQL,strconn)
%>
 

This does not seem to return anything.

Thanks


!-------------------------------------!
David Williams


Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com

------=_NextPart_000_0071_01C25E7A.243A0B40--