A strophe (') Problem
I want to update field name with string that includes Astrophe('). When use
ExecuteQuery it gives Error. How to overcome this problem
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nilesh JagdalePosted Jul 27, 2006, 12:36 PM
Update test set name='harsih' where name='san'tosh'
To resolve this just replace the ' with '' in update query
As below
Update test set name='harsih' where name='" + strNewname.ToString().Replace("'","''").Trim() + "'
Thanks and Regards,
Nilesh Jagdale