The problem was with a record in the db that contained a single (').
Using Gambas Replace function in the SQL statement solves the problem.
SELECT * FROM gCal WHERE EventText = '" & Replace(sNew, "'", "''") & "'"
Thanks for the help.SELECT * FROM gCal WHERE EventText = '" & Replace(sNew, "'", "''") & "'"
Thanks for the help.John Lancaster's birthday