1. Jonathan Ashwell
  2. Valentina Database ADK
  3. Monday, April 05 2021, 03:09 PM
  4.  Subscribe via email
I've been using Valentina.EscapeString() for Regex searches, but the searches fail if they have characters like (, ), or ? I see these characters aren't being escaped properly to

\(
\)
\?

I can add the \ myself and now the Regex searches work.

What does Valentina.escapestring do, then? Should I roll my own escape method?
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Jonathan,

Valentina.EscapeString() escapes ' and \ characters. The returned string can be safely used as a string (single-quoted) literal in the SQL query.
Comment
There are no comments made yet.
Jonathan Ashwell Accepted Answer
Thanks. So the answer is yes, we must escape any other reserved characters ourselves.
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories