Bug in ODBC driver 08.00.0004 and stored procedure

From: "Joost Kraaijeveld" <J(dot)Kraaijeveld(at)Askesis(dot)nl>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Bug in ODBC driver 08.00.0004 and stored procedure
Date: 2005-02-13 20:22:03
Message-ID: A3D1526C98B7C1409A687E0943EAC41048A161@obelix.askesis.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi all,

Attached is a little ODBC program that shows the bug. Running the program against a database with a stored procedure it reports an error calling SQLExecute:

"SQLSTATE = HY010
Message: The cursor is open."

I think the cursor is open because the query is allready executed to get the data for SQLNumResultCols. Rerunning the query to get the data leads to this error.

To reproduce the error you can use the following database and function (and/or adjust the code to represent your database, user and password):

CREATE DATABASE "TestDB" WITH OWNER = postgres ENCODING = 'SQL_ASCII';

CREATE OR REPLACE FUNCTION getobjectid()
RETURNS text AS
'
select((select(to_char(current_timestamp, \'yyyy-mm-dd-hh-mm-ss\'))) || (select(to_char((nextval(\'tsfraction\')),\'-FM000000MI\')))) as return;
'
LANGUAGE 'sql' VOLATILE;

Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J(dot)Kraaijeveld(at)Askesis(dot)nl
web: www.askesis.nl

Attachment Content-Type Size
main.cpp application/octet-stream 4.4 KB

Browse pgsql-odbc by date

  From Date Subject
Next Message Paul Cochrane 2005-02-14 09:57:22 Re: Bug in convert.c copy_and_convert_field
Previous Message Dave Page 2005-02-13 18:14:49 Re: New release