Sign in to follow this  

How to escape single quota into two single quota ?

This topic is 3499 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
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

This topic is 3499 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this