• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

vvIn_Virtual option to escape SQL special characters of a string literal

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • vvIn_Virtual option to escape SQL special characters of a string literal

    Hello,
    It would be a nice feature of vvIn_Virtual to not only be able to wrap a string in single quotes, but to also safely escape any characters that could cause issues in an SQL string literal (like a single quote).

    Assume that myVar = "ab'c"
    and a data source is like:
    Code:
    Select myOtherColumn
    From MyTable
    Where myColumn = vvIn_Virtual('myVar', ' ', 'char', 20, null, 'true')?
    then currently it would end up as the following and cause an SQL error:
    Code:
    Select myOtherColumn
    From MyTable
    Where myColumn = 'ab'c'


    Could always have syntax like
    vvIn_Virtual('myVar', ' ', 'char', 20, null, 'escape')?
    to do the safe escaping version.?
Working...
X