PxPlus User Forum

Twitter Twitter Twitter

Author Topic: [odb] / [mysql] escape characters  (Read 46 times)

bteixeira

  • Member
  • **
  • Posts: 18
    • View Profile
[odb] / [mysql] escape characters
« on: August 13, 2020, 04:21:49 PM »
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

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3328
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: [odb] / [mysql] escape characters
« Reply #1 on: Today at 09:55:02 AM »
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.