Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse FBStatement across new transactions #76

Closed
heri16 opened this issue Feb 7, 2017 · 1 comment
Closed

Reuse FBStatement across new transactions #76

heri16 opened this issue Feb 7, 2017 · 1 comment

Comments

@heri16
Copy link

heri16 commented Feb 7, 2017

The code below fails:

statement = conn.prepareSync(...);

transaction = conn.startNewTransactionSync();
if (!transaction.inTransaction) { transaction.startSync(); }
statement.execInTransSync(transaction, '|' + itemNos.join('|') + '|');
transaction.rollbackSync();

transaction = conn.startNewTransactionSync();
if (!transaction.inTransaction) { transaction.startSync(); }
statement.execInTransSync(transaction, '|' + itemNos.join('|') + '|');

With Error:

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

    at Error (native)
    at fetch (D:\slackbot\accurate_db.js:165:23)
    at D:\slackbot\accurate_db.js:189:13
    at prepare (D:\slackbot\accurate_db.js:150:11)
    at D:\slackbot\accurate_db.js:187:11
    at D:\slackbot\node_modules\firebird\firebird.js:78:17
xdenser added a commit that referenced this issue Feb 7, 2017
@xdenser xdenser closed this as completed Feb 16, 2017
@heri16
Copy link
Author

heri16 commented Feb 17, 2017

Thanks for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants