| From: | "Erik Hjortsberg" <Erik_Hjortsberg(at)hermes(dot)ics(dot)lu(dot)se> |
|---|---|
| To: | pgsql-odbc(at)postgresql(dot)org |
| Subject: | returning refcursors (into Visual Basic) |
| Date: | 2002-02-28 16:41:11 |
| Message-ID: | fc.000f45f30034b134000f45f30034b134.34b157@hermes.ics.lu.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-odbc |
Hello.
I'm having some serious difficulties with making a function returning a
recordset in the form of a refcursor to Visual Basic through pgODBC (or
through pgAdminII).
I'm using postgreSQL 7.2 and pgODBC 7.1.9
I've tried with a function such as
CREATE FUNCTION "returnCourse"("bpchar") RETURNS "refcursor" AS
'declare
_course ALIAS FOR $1;
_refcursor refcursor;
begin
OPEN _refcursor FOR SELECT * FROM course where code = _course;
return _refcursor;
end;
' LANGUAGE 'plpgsql';
But the only thing I get is a single value recordset with the string
"<unnamed cursor 1>".
Does anybody know what I'm doing wrong?
/erik hjortsberg
http://hysteriskt.viktigt.nu
http://www.ostgota.lu.se
http://come.to/erik.h
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Benoit Menendez | 2002-02-28 18:48:43 | Re: Case folding in DatabaseMetaData |
| Previous Message | Jean-Michel POURE | 2002-02-28 09:57:09 | Re: [ODBC] Multibyte ODBC |