Good day,
I have read the answer to this before but could not find it, nor remember the solution. So...
The [Field] is [LastName]
The <value> is <O'Mally>
The issue is the tick (')
When I run the following query, it returns: Syntax error (missing operator). I'm sure this is because the tick causes the SQL statement to fail.
rst.Open "SELECT * FROM Person WHERE LastName='O'Mally';"
How do I write O'Mally to the DB correctly so I can find it later without the above issue? How do I read O'Mally from the DB without receiving the above issue?
Many thanks,
Magnus
I have read the answer to this before but could not find it, nor remember the solution. So...
The [Field] is [LastName]
The <value> is <O'Mally>
The issue is the tick (')
When I run the following query, it returns: Syntax error (missing operator). I'm sure this is because the tick causes the SQL statement to fail.
rst.Open "SELECT * FROM Person WHERE LastName='O'Mally';"
How do I write O'Mally to the DB correctly so I can find it later without the above issue? How do I read O'Mally from the DB without receiving the above issue?
Many thanks,
Magnus