Administer > Database administration > Case-sensitivity > JavaScript implications of case-insensitivity

JavaScript/RAD implications of a case-insensitive database environment

In a case-insensitive environment, such as when Service Manager is set up to connect to Microsoft SQL Server with a case-insensitive code page or Oracle with case-insensitive settings, you should be aware that:

  • Only Service Manager queries are evaluated case-insensitively.
  • All Service Manager expressions are still evaluated case-sensitively.
    This includes RAD expressions, JavaScript expressions as well as the expressions within DVD conditions in Service Manager forms.

For example, given a database that contains a contacts record where the actual is stored in the database as "Smith," the following code will successfully select the record but fail the Java Script test:

   var contactList = new SCFile( "contacts" );
   var findContact = contactList.doSelect( "\"SMITH\"" );
   var lastName = "SMITH";
   if ( lastName == findContact.last_name )	// This expression is evaluated case-sensitively.
      print("Hello!");				// This code will never be executed.

In this example:

  • The query in contactList.doSelect() will be evaluated case-insensitively, therefore findContact will get the record back.
  • All other JavaScript expressions will evaluate case-sensitively. Therefore, statements within the "if" block will never be executed.

Related topics

Load/unload implications of case-sensitivity
Oracle case-sensitivity

Validate case-insensitive unique indexes

Service Manager Installation