I have feaced the similar problem in my earlier days. Its prettry simple, The problem is with the Database. When you Insert the text or Varchar into data base, the value must be enclosed with in single quotes.
In your case, I think, You have written a ad-hoc query to insert the text. If the text has single quote, the database takes the text between first two single quotes as value. Actual closing quote is some where. Then the rest of the text is considered as another parameter or value. This is the reason for this error.
You can solve it by replacing the ' with '' (Single quote with two single quotes.), and you can use regular expressions also , http://dotnet-globalization.blogspot.com.