Hi,
I'm trying to create an sql expression with a variable "arrondissement" but there's a problem with some attributes that contain apostrophe (quote) in their names like :
Baie d'Urfé or L'île-Bizard-Sainte-Geneviève.
I've try a few things but i'm always getting an error due to the apostrophe. It's work fine with other names that doesn't have quote.
lyr.definitionQuery = '"Arrondisse"' + "=" + "'" + arrondissement + "'"
or
lyr.definitionQuery = '"Arrondisse"' + "=" + "'\"%s\"'" %(arrondissement)
Thanks you for your help