Skip site navigation (1) Skip section navigation (2)

Re: Problem returning a cursor through ODBC to ASP layer from postgres

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "david williams" <dw_remote(at)hotmail(dot)com>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Problem returning a cursor through ODBC to ASP layer from postgres
Date: 2002-09-17 09:43:40
Message-ID: EKEJJICOHDIEMGPNIFIJMEIDJCAA.Inoue@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
-----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


In response to

pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2002-09-17 09:45:38
Subject: Re: datetime and ODBC driver
Previous:From: Tahira AslamDate: 2002-09-17 07:08:19
Subject: Re: Could not connect to remote socket

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group