c++ - Transactional objects in pqxx -


i'm new in postgresql , pqxx. code in c++. i've written exemple program. everythig alright when execute program see error :

started nontransaction while transaction still active.

here's code : http://pastebin.com/p8cj6eaz

if knows how use transactional objects please explain me. greetings , help.

message started nontransaction while transaction still active not error. pqxx not designed handle nested transactions , can handle 1 transaction @ time. can read details here; pqxx reuse / reactivate work transaction

your code working ok provided commit transaction before issuing non-transaction sql command, change;

uncomment commit on line 49 finish transaction; w.commit();

and change line 69 w.exec(sql); non-transaction work; n.exec(sql);

hope helps.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -