List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:November 13 2008 10:36am
Subject:Re: Doubt regrading uses of Mysql++
View as plain text  
On Nov 13, 2008, at 2:01 AM, rajdeep.shyam wrote:

> So how to copy the mysql ::string to std::string?

If you simply assign one to the other, it should work, though it won't  
work reliably with BLOB data, as it uses a C string pointer.  To get a  
copy that can cope with embedded null characters, this should work:

	mysqlpp::String s1 = ... stuff
	std::string s2(, s1.length());

However, I suspect your problem isn't actually in the string copy.  I  
think something else is going on.  Please post your code and the  
compiler error messages so we can diagnose it.
Doubt regrading uses of Mysql++rajdeep.shyam13 Nov
  • Re: Doubt regrading uses of Mysql++Warren Young13 Nov