Question
· Mar 13, 2018

How to escape double quotes on a SQL Update via ODBC

Hi all,

I am new in Cache. I have to update a record with a long text field, for that,  I am using ODBC but the issue is that it is returning an error when I execute the ODBC  SQL statement because the field contains some commas, colon, double quotes, single quotes, and CR LF characters.

There is a way to escape this chars? I have seen I can save the field when I replace the single quotes with a double single quote (it's -> it''s) but I can not save the information when the field contains double quote chars. What about the other chars?

The statement is something like:

SET description = '240-page + cover perfect bound book. Insides on 29" 22.1 ",  productName = ' "AAA244 - Sometext, sometext.  "  '  WHERE id=25

Any Ideas? Than you in advance.

Discussion (6)1
Log in or sign up to continue