
fbclient - issue #2
"Cursor is not open" when trying to fetch a INSERT ... RETURNING query
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 RhinoOops. Firebird 2.5 beta 2.
Comment #2
Posted on Aug 24, 2010 by Grumpy RhinoApparently 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 HippoComment deleted
Comment #4
Posted on Oct 12, 2010 by Happy Hippofixed in repository for 0.5
Status: Fixed
Labels:
Type-Defect
Priority-Medium