When running the below query getting the above error,
String sql = "((NAME= '" + sReceipts[0] + "' ) OR (SECTION IN ('RECEIPT', 'PROJECT') AND NAME IS NULL))";
sReceipts[0]
value is 'Tom's' (with an APOSTROPHE) gives the error
But if sReceipts[0] = 'Ann' no error occur.
Tried to solve with String.Format but I couldn't. What is the best approach please?