We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Poco is raising a null pointer exception when trying to execute a query on a session.
To Reproduce perform any operation on a sqlite3 session
Expected behavior the respective query should be executed
Logs stdout
PS C:\Users\dte\Documents\Playground\cpp\oikia-api> xmake ; xmake r [ 50%]: compiling.release src\main.cpp [ 75%]: linking.release oikia-api.exe [100%]: build ok, spent 4.437s main 22 Null pointer
Screenshots
#include <iostream> #include <Poco/Data/Session.h> #include <Poco/Data/SQLite/Connector.h> using namespace Poco::Data::Keywords; using Poco::Data::Session; using Poco::Data::Statement; struct Person { std::string name; std::string address; int age; }; int main(int argc, char** argv) try { Poco::Data::SQLite::Connector::registerConnector(); Session session("SQLite", "sample.sqlite3"); std::cout << __FUNCTION__ << " " << __LINE__ << std::endl; session << "DROP TABLE IF EXISTS Person", now; std::cout << __FUNCTION__ << " " << __LINE__ << std::endl; session << "CREATE TABLE person (Name varchar(50), Address varchar(50), Age integer(3))", now; Person person = { "John Doe", "Beira", 20, }; Statement insert(session); insert << "INSERT INTO Person VALUES (?,?,?)", use(person.name), use(person.address), use(person.age); std::cout << __FUNCTION__ << " " << __LINE__ << std::endl; insert.execute(); Statement select(session); select << "SELECT Name, Address, Age FROM person", into(person.name), into(person.address), into(person.age), range(0, 1); std::cout << __FUNCTION__ << " " << __LINE__ << std::endl; while (!select.done()) { select.execute(); std::cout << person.name << ", " << person.address << ", " << person.age << "\n"; } return 0; } catch (std::exception& e) { std::cout << e.what() << std::endl; }
Please add relevant environment information:
Additional context Im using xmake to get the depencency
The text was updated successfully, but these errors were encountered:
@ReneMuala Does it work with Poco 1.14?
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Poco is raising a null pointer exception when trying to execute a query on a session.
To Reproduce
perform any operation on a sqlite3 session
Expected behavior
the respective query should be executed
Logs
stdout
Screenshots
Please add relevant environment information:
Additional context
Im using xmake to get the depencency
The text was updated successfully, but these errors were encountered: