Hi all,
Attached is a little ODBC program that shows the bug. Running the program against a database with a stored procedure it
reportsan 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
queryto 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.Kraaijeveld@Askesis.nl
web: www.askesis.nl