KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: SQL Engine Case Sensitivity
PRODUCT: 4D | VERSION: 14.x | PLATFORM: Mac & Win
Published On: December 3, 2015

4D does not take the case of a character into account, however the SQL Engine, by default, does. This setting can be toggled using the SET DATABASE PARAMETER command with the (44) selector. Passing a value of 1 will set the engine to enable case sensitivity and passing a value of 0 will disable case sensitivity.

For example, in 4D:

C_BOOLEAN($var_b)
If ("A"="a")
   $var_b:=True
Else
   $var_b:=False
End if

But with the SQL engine this can cause complications depending on implementation thus the following codes can be used.

To Disable Case sensitity ("A"="a" is True)
SET DATABASE PARAMETER(44;0)


To Enable Case sensitity ("A"="a" is False) this is the default setting
SET DATABASE PARAMETER(44;1)