Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Can't reuse Poco::Data::Statement with a new set of bindings #3165

Closed
db4 opened this issue Dec 11, 2020 · 5 comments
Closed

Can't reuse Poco::Data::Statement with a new set of bindings #3165

db4 opened this issue Dec 11, 2020 · 5 comments
Assignees
Labels

Comments

@db4
Copy link

db4 commented Dec 11, 2020

I'm trying to reuse the same statement with different bindings. Surprisingly it does not work:

Session session(...);
Statement statement(session);
statement << "INSERT INTO test(f1) VALUES(?)";
statement.addBind(Poco::Data::Keywords::bind(1, "f1"));
statement.execute(); //OK
statement.removeBind("f1");
statement.addBind(Poco::Data::Keywords::bind(2, "f1"));
statement.execute(); // Assertion violation: !pBinder.isNull() [in file "D:\.conan\data\poco\1.10.1\_\_\package\79d47f014080a953179622161c373e018e32729f\include\Poco/Data/Binding.h", line 171]

This happens for SQLite, but I don't think it's database-specific. Am I just missing something?

@github-actions
Copy link

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the stale label Dec 12, 2021
@github-actions
Copy link

This issue was closed because it has been inactive for 60 days since being marked as stale.

@VKlayd
Copy link

VKlayd commented Aug 15, 2023

@db4 Dmitry, did you find any solution or workaround for this issue?

@aleks-f aleks-f self-assigned this Aug 15, 2023
@aleks-f aleks-f added this to the Release 1.13.0 milestone Aug 15, 2023
@aleks-f
Copy link
Member

aleks-f commented Aug 15, 2023

Can't reproduce:
image

@aleks-f aleks-f reopened this Aug 15, 2023
@aleks-f aleks-f added invalid and removed stale labels Aug 15, 2023
@aleks-f
Copy link
Member

aleks-f commented Aug 15, 2023

My best guess is old version of Poco

@aleks-f aleks-f removed the invalid label Aug 15, 2023
@pocoproject pocoproject locked and limited conversation to collaborators Aug 15, 2023
@aleks-f aleks-f converted this issue into discussion #4108 Aug 15, 2023
@aleks-f aleks-f added the fixed label Aug 15, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

3 participants