While building some dynamic strings for queries or something you should keep in mind that the single quotes / double quotes will definitely make some problems. In the above case we placed the quotes just around the String Value. But what happens if it contains a single Quotes. It will Throw Exception, for sure. The solution which I found on GOOGLE is given below. Yes replace the lonely single quotes with a couple of single quotes. And it resolved my problem. |