• Advertisement
Sign in to follow this  

How to escape single quota into two single quota ?

This topic is 3568 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, I got a char * pointer to some large binary data and I am trying to replace all single quota ' into two single quota '' before inserting into datbase, any ideas ? thank you.

Share this post


Link to post
Share on other sites
Advertisement
I assume you're using C++ - could you not put the data in some sort of IO stream? then go through each bit and see what character it is and replace it if it's a ' with a "? Or can you not just go through every char in the char array and do the same thing? Maybe there are some find / replace functions in the C++ string class that you could use?

Sorry I can't be of more help, haven't typed any C++ in a few years now.

Cheers,

James

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement