There was mistake in my example code. I've forgotten one line. So here it goes:
typedef vector<string> Masks;
typedef unsigned long int ULongInt;
typedef boost::optional< ULongInt > OptULong;
typedef soci::rowset<OptULong> LongRowset;
typedef boost::optional<std::string> OptString;
typedef soci::rowset<OptString> StringRowset;
LongRowset nodeIDs = sql.prepare << "select distinct " + node_ID_FK +
" as wezel from " + Node;
for (LongRowset::const_iterator nodeIterator = nodeIDs.begin();
nodeIterator != nodeIDs.end(); ++nodeIterator)
{
// ...
Masks masksContainer;
StringRowset masks = sql.prepare << "select " + url_mask + " as
mask from " + URL_Mask + " where " + node_ID_FK + "=" + lexical_cast<
string > (nodeIterator->get());
for (StringRowset::iterator maskIterator = masks.begin();
maskIterator != masks.end(); ++maskIterator)
if(maskIterator->is_initialized())
masksContainer.push_back(maskIterator->get() +
string("|") + lexical_cast< string >(6)); // I append "|6" at the end
just to mark when the strings end
}
And this produces pathological strings as in previous message. Please help.
--
Regards
Michał Nowotka
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users