List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:June 17 2006 2:00am
Subject:Re: Quoted strings in resultset fields
View as plain text  
Orton, Steve wrote:
> In my code, I have been assigning to a std::string type the output
> from a row[] or and noticed the strings contain quotes.  If
> I print out the string and expect it to contain foo, It comes out as
> 'foo'.  Is there a way in the mysql++ api to turn off emitting the
> quotes or do I have to trim the string using the string's api?

You've got to be doing something wrong on your end.  Run the examples. 
Notice how none of them exhibits this quoting behavior you talk about. 
Then compare what the examples do to what your code does.

> Also, I would like to avoid having a 'NULL' emitted when fields
> contain a NULL.  I would like to emit an empty string or zero(0)
> instead.

Read the user manual sections on nulls.  The solution is there.
Quoted strings in resultset fieldsSteve Orton15 Jun
  • Re: Quoted strings in resultset fieldsWarren Young17 Jun