SqlTraits_impl.h:49: error: 'read' is not a member of 'Wt::Dbo::sql_value_traits<Wt::WString, void>' Wt 3.3.0
Added by Alistair Lowe over 11 years ago
Hi guys,
A little bit of an odd one here. I have a class that extends WContainerWidget and within this is the attribute:
dbo::QueryModel<WString> linkBoxColumnModel;
Despite using a standard WString result type, I'm receiving the following compile errors, which are caused purely by the presence of this attribute.
/usr/include/Wt/Dbo/SqlTraits_impl.h: In instantiation of 'static Result Wt::Dbo::query_result_traits<Result>::load(Wt::Dbo::Session&, Wt::Dbo::SqlStatement&, int&) [with Result = Wt::WString]':
/usr/include/Wt/Dbo/collection_impl.h:150:5: required from 'void Wt::Dbo::collection<C>::iterator::shared_impl::fetchNextRow() [with C = Wt::WString]'
/usr/include/Wt/Dbo/collection_impl.h:124:3: required from 'Wt::Dbo::collection<C>::iterator::shared_impl::shared_impl(const Wt::Dbo::collection<C>&, Wt::Dbo::SqlStatement*) [with C = Wt::WString]'
/usr/include/Wt/Dbo/collection_impl.h:164:3: required from 'Wt::Dbo::collection<C>::iterator::iterator(const Wt::Dbo::collection<C>&, Wt::Dbo::SqlStatement*) [with C = Wt::WString]'
/usr/include/Wt/Dbo/collection_impl.h:323:44: required from 'Wt::Dbo::collection<C>::iterator Wt::Dbo::collection<C>::begin() [with C = Wt::WString]'
/usr/include/Wt/Dbo/QueryModel_impl.h:243:5: required from 'Result& Wt::Dbo::QueryModel<Result>::resultRow(int) [with Result = Wt::WString]'
../eps/trunk/RTU/WebServer/WebServer/wlinkboxsearch.cpp:30:1: required from here
/usr/include/Wt/Dbo/SqlTraits_impl.h:49:3: error: 'read' is not a member of 'Wt::Dbo::sql_value_traits<Wt::WString, void>'
The reason I'm finding this odd is that I've used this exact approach elsewhere in my code with it working perfectly.
Any ideas?
Many thanks
Replies (3)
RE: SqlTraits_impl.h:49: error: 'read' is not a member of 'Wt::Dbo::sql_value_traits<Wt::WString, void>' Wt 3.3.0 - Added by Wim Dumon over 11 years ago
#include ?
BR,
Wim.
RE: SqlTraits_impl.h:49: error: 'read' is not a member of 'Wt::Dbo::sql_value_traits<Wt::WString, void>' Wt 3.3.0 - Added by Alistair Lowe over 11 years ago
I'm afraid not, I have the following files included in the same header:
#include <Wt/WSignal>
#include <Wt/WString>
#include <Wt/Dbo/Dbo>
#include <Wt/Dbo/SqlTraits_impl.h>
#include <Wt/Dbo/SqlTraits>
#include <Wt/Dbo/Session>
#include <Wt/Dbo/Query>
#include <Wt/Dbo/QueryModel>
#include <Wt/WContainerWidget>
#include <Wt/WHBoxLayout>
#include <Wt/WComboBox>
#include <Wt/WLineEdit>
#include <Wt/WPushButton>
SqlTraits_impl.h is out of desperation of course.
RE: SqlTraits_impl.h:49: error: 'read' is not a member of 'Wt::Dbo::sql_value_traits<Wt::WString, void>' Wt 3.3.0 - Added by Alistair Lowe over 11 years ago
Ah my apologies, I didn't realise there was separate WtSqlTraits header file.
Many thanks