Export to GitHub

fbclient - issue #2

"Cursor is not open" when trying to fetch a INSERT ... RETURNING query


Posted on Aug 24, 2010 by Grumpy Rhino

After struggling for a day trying to fix the aforementioned error, I couldn't find a way to solve the situation.

To reproduce the problem, just adjust the Usage example:

local fb = require 'fbclient.class' local at = fb.attach('localhost:/my/db.fdb', 'SYSDBA', 'masterkey') local sql = 'insert info foo (id,name) values (?,?) returning id, name' for st, id, name in at:exec(sql, 1, 'John Doe') do --> error print(id, name) end at:close()

I'm using version 0.4 on a MacOS X

Comment #1

Posted on Aug 24, 2010 by Grumpy Rhino

Oops. Firebird 2.5 beta 2.

Comment #2

Posted on Aug 24, 2010 by Grumpy Rhino

Apparently it is a "problem" with Firebird 2.5 family. They no longer accept isc_dsql_fetch for isc_info_sql_stmt_exec_procedure types. You have to use isc_dsql_execute2 instead.

Issue link @ fb bug tracker: http://3.ly/dGtG

Comment #3

Posted on Aug 24, 2010 by Happy Hippo

Comment deleted

Comment #4

Posted on Oct 12, 2010 by Happy Hippo

fixed in repository for 0.5

Status: Fixed

Labels:
Type-Defect Priority-Medium