dbTalk Databases Forums  

Quoted strings in resultset fields

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Quoted strings in resultset fields in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Quoted strings in resultset fields - 06-15-2006 , 03:09 PM






Hello,

I'm working with the 2.1.1 version of mysql++ getting data out of a =
5.1.7 version of mysql proper. =20

In my code, I have been assigning to a std::string type the output =
from a row[] or row.at() 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?

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.

As always, I appreciate any help you can give on this....steve---


Steven J Orton
Software Engineer
Northrop Grumman Mission Systems
Middletown, RI 02842


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: Quoted strings in resultset fields - 06-16-2006 , 09:02 PM






Orton, Steve wrote:
Quote:
In my code, I have been assigning to a std::string type the output
from a row[] or row.at() 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.

Quote:
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.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.