Using Quotes in Microsoft SQL Server
When you construct a request in a client application to send to the adapter with a Microsoft SQL Server database, you must note the use of double quotation marks in quotes.
For example, the following procedure is part of a request from an application. Double quotation marks are used, which is incorrect. An error will be returned.
select @qry = "Update " + @tablename + " set ORDER_DESCRIPTION = 'UPDATE TEST'" + ", ORDER_PRICE = 10109.25"
The following procedure is the same as the previous one, but uses single quotes. It will be correctly processed.
select @qry = 'Update ' + @tablename + ' set ORDER_DESCRIPTION = ''UPDATE TEST'', ORDER_PRICE = 10109.25'
See Delimited Identifiers in your Microsoft SQL Server documentation for details.