f2s_esql_escape_string

Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers

Syntax

f2s_esql_escape_string {string} to {variable}

Parameter

Description

string

The string to be escaped

variable

Variable to hold the newly escaped string

Description

This command is used to properly set escape strings before they are used in embedded SQL statements. This can be extremely important when you do not have full control of the strings being passed to the SQL statement as this will ensure that the strings are properly quoted.

Example

     String sEscaped
     String sVal

     f2s_activate_driver "f2s_ms"
     Move "They said to me, 'hello'." to sVal
     f2s_esql_escape_string sVal to sEscaped
     // Escaped String value: *They said to me, \'hello\'.*

Replaces

SQL_ESCAPE_STRING