[odb] / [mysql] escape characters

Started by bteixeira, August 13, 2020, 04:21:49 PM

Previous topic - Next topic

bteixeira

We have code writing to a database using the [odb] tag.  It works well generally, however at one client, they are using a MySQL server.  MySQL needs backslashes to be escaped (especially at the end of a field where it would end up escaping the quote delimiters).  If using the [odb] tag, a backslash in data is not getting escaped.  Would using the [mysql] tag instead resolve this?  Is there an option or setting that would let us use the [odb] tag still but correctly escape the backslashes?

Mike King

The logic for an INSERT or UPDATE SQL statement in the mysql interface will double up both the apostrophe and the backslash so it should work for you.
Mike King
President - BBSysco Consulting - http://www.bbsysco.com
eMail: mike.king@bbsysco.com