List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:January 28 2009 10:23pm
Subject:Re: Convert mysqlpp::String to std::string
View as plain text  
On Jan 28, 2009, at 3:15 PM, Robert Simmons wrote:

> "String" isnt defined within <string> or <string.h>

I assumed when I wrote that that you would realize it needed either  
"using namespace mysqlpp" or a "mysqlpp::" qualifier.

> Instead of returning "1;2;3;4;5" as it should in this case, the  
> string only contains "1 - note the missing quote.

Given the data, I suspect the actual problem is that you didn't do the  
quoting or escaping correctly when inserting it into the DB.  Quotes  
and semicolons are special characters in SQL.  If you use something  
like MySQL Query Browser to examine the table, I think you'll find  
that it's truncated in the DB.

See http://tangentsoft.net/mysql++/doc/html/userman/tutorial.html#qescape
Thread
Convert mysqlpp::String to std::stringRobert Simmons28 Jan
  • Re: Convert mysqlpp::String to std::stringWarren Young28 Jan
    • Re: Convert mysqlpp::String to std::stringRobert Simmons28 Jan
      • Re: Convert mysqlpp::String to std::stringWarren Young28 Jan
        • RE: Convert mysqlpp::String to std::stringJeremy Rottman29 Jan
          • Re: Convert mysqlpp::String to std::stringRobert Simmons29 Jan