martindavey
Programmer
I am trying to insert into Access using C++
I have a variable that contains a surname that may well contain an apostrophe, eg. O'Reily.
My SQL insert string is:
"insert into [myTable] (Surname) ('%s')", ...
I get a syntax error on inserting because of the apostrophe in the surname.
I have tried using escaped quotes, and brackets but to no avail.
Removing the apostrophe is not an option.
Thanks, Martin :O|
I have a variable that contains a surname that may well contain an apostrophe, eg. O'Reily.
My SQL insert string is:
"insert into [myTable] (Surname) ('%s')", ...
I get a syntax error on inserting because of the apostrophe in the surname.
I have tried using escaped quotes, and brackets but to no avail.
Removing the apostrophe is not an option.
Thanks, Martin :O|