Details

The function FNopm_CleanSQLString in dataman.pas is escaping several characters that can cause problems in SQL strings. Among them, there were the percent symbol and the underscore.

Bug 137 was about underscore character. As a solution we disable that escaping.
This bug is about percent symbols.

The real problem is that MySQL needs percent symbols and underscores escaped only when searching, not when entering or updating data.

The solution is to let know the function FNopm_CleanSQLString when we are searching and when we are not. We added a new parameter (Searching) to be used only when the escaped string will be used as a search parameter (in a where clause).