Now I am having an issue where trying to insert some info into a database is giving me a SQLException: General Error. I have determined the issue is that my string has apostrophes in it. Here is my update statement:
AniDB.updateTbl("UPDATE SeriesTbl SET SeriesSynopsis = '" + synop + "' WHERE SeriesID = " + sID);
SeriesSynopsis contains many records, all with different strings. Let’s say for sake of argument, one record is “Tom doesn’t like cats” and another is “Timothy couldn’t care less about cats.” The apostrophes are in different positions and are interfering with my SQL Statement. Any ideas on how to fix this?
try
You can escape a quote with 2 quotes.