Wt::Dbo : Querying objects restriction
Added by Yosr Chebbi almost 10 years ago
Hello,
I was wondering if the restriction of the concurrent use of the statement is still existing in Wt-3.3.4 ?
Could it be responsible for other exceptions apart of the one mentionned in the Wt::Dbo tutorial ?
Thanks in advance.
Best regards,
Yosr
Replies (3)
RE: Wt::Dbo : Querying objects restriction - Added by Koen Deforche almost 10 years ago
Yes it still exists, but no, it could not give rise to other issues.
What exceptions do you get?
Koen
RE: Wt::Dbo : Querying objects restriction - Added by Yosr Chebbi almost 10 years ago
Hello,
I was trying to use the authentication module with the planner example, I did the changes I judged necessary. When I try to login an error appears: "Wt:fatal error: Dbo load<>: no active transaction" and the seesion is removed. I found out that when I remove the declaration of "entries" from "void CalendarCell::update(const dbo::ptr& user, const Wt::WDate& date)" method, the authentication works fine, but when I try to enter a new appointment the app crashes and an access violation exception appears. And it points to this line \" e = session_.add(new Entry());\" in the file EntryDialog.C .
I couldn't understand its behaviour, any help would be appreciated.
Thank you in advance.
Best regards,
Yosr
exception.PNG (125 KB) exception.PNG |
RE: Wt::Dbo : Querying objects restriction - Added by Koen Deforche almost 10 years ago
'No active session' means you need to instantiate a Wt::Dbo::Transaction first before you attempt to do something which needs the database.
To know where you need it you should try to break on throwing an exception.
It may be relevant to watch your log files for other warnings or errors that precede these problems?
I couldn't directly say what the causes the segmentation fault.