xdenser / node-firebird-libfbclient

Firebird SQL binding
MIT License
82 stars 34 forks source link

FBStatement cannot be reused after rollback/commit #64

Closed heri16 closed 7 years ago

heri16 commented 8 years ago

Calling execSync again against the same FBStatement object causes crash:

Error: In FBStatement::execSync, free_statement - Dynamic SQL Error SQL error code = -501 Attempt to reclose a closed cursor

at Error (native)
at Session.fetchItemAnalysis (D:\slackbot\accurate_db.js:79:17)
at Object.convo.ask.callback (D:\slackbot\slack_bot.js:265:35)
at Conversation.handle (D:\slackbot\node_modules\botkit\lib\CoreBot.js:129:41)
at D:\slackbot\node_modules\botkit\lib\CoreBot.js:980:31
at Object.bot.findConversation (D:\slackbot\node_modules\botkit\lib\Slackbot_worker.js:657:25)
at D:\slackbot\node_modules\botkit\lib\CoreBot.js:978:21
at next (D:\slackbot\node_modules\botkit\node_modules\ware\lib\index.js:82:27)
at Ware.run (D:\slackbot\node_modules\botkit\node_modules\ware\lib\index.js:88:3)
at Object.Botkit.botkit.receiveMessage (D:\slackbot\node_modules\botkit\lib\CoreBot.js:973:35)
heri16 commented 8 years ago

Steps to reproduce:

FBStatement.execSync() -> connection.rollback() -> FBStatement.execSync()

xdenser commented 7 years ago

use FBStatement.execSync() -> connection.rollback() ->connection.startTransactionSync() -> FBStatement.execSync()