Using Quotes in a Request with Microsoft SQL Server Databases

When constructing a request in your application that will be processed by the adapter with a Microsoft SQL Server database, you must take care when using 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 above, 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.

Note: The SQL statement should contain only ASCII characters.
Note: If your SQL statements contain non-ASCII characters, convert them into a stored procedure and invoke the procedure using custom RPC operations.