>That did it! Thanks Sergey. I would never have tried that. It's too simple.
Generally, I've found it a good practice to have one class which will handle all the requests to be sent to SQL server. So doubling the apostrophe happens only once, in one location.
One more thing - SET QUOTED_IDENTIFIER ON should really stay on, i.e. the apostrophe is the only string delimiter; quotation marks, [ and ] should remain a part of the syntax for server-side names. I've seen quite a mess when it was OFF, and then we had to double the quotation marks too, which seemed to work too well: I've seen as much as eight quotation marks surrounding a string...