If ur query contain single apostrophe like this
SELECT * FROM Products WHERE ProductName = 'King's Jalepenos'
Then replace ur single apostrophe with two apostrophe like
SELECT * FROM Products WHERE ProductName ='King''s Jalepenos'
Better do it in C# coding as follows
string
str = "King''s Jalepenos";
str= str.Replace("'","''");
No comments:
Post a Comment