Delphi: Field "False" not found. only happened on my computer

I have TCustomClientDataSet

(in memory) that is used for filtering in a Delphi program.

My filtering code looks like this:

  CDSFilteredGroup.Filter := 'ACP_type = 1 AND ACP_by_default <> False';
  CDSFilteredGroup.Filtered := True;

      

When I compile and run it, I only got the following error while installing Delphi (XE4) on my computer:

CDSFilteredGroup: Champ 'False' non trouvé.

      

Translation: Field 'False' not found. The same code compiles and works fine on my colleagues' computers, but not mine. There must be an option somewhere that I am missing, any idea?

Remember the code is fine and working ...

+3


source to share


1 answer


The TExprParser instance used to process the filter string depends on the resources specified as STextTrue and STextFalse. Perhaps you have a different language than English configured for your IDE library. Try switching to English and see if the error goes away.

To work around this issue, generally replace the text "False" with the contents of the STextFalse resextstring resource.



BTW, this was fixed in later versions of Delphi, which also accept the literal "False" even in non-english environments.

+7


source







All Articles