- This topic has 3 replies, 2 voices, and was last updated 6 years, 1 month ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
Home › Forums › kbmMemTable › Custom Decimal Separator for kbmExprParser
Tagged: kbmMemTable
Hey there,
I want to set a Expression to the Filter property on a normal kbmMemTable and everything works fine except of decimal values. Because the kbmExprParser uses the windows format settings and cause I am from Germany the default decimal separator is a comma. If I now use the Filter as an SQL Statement this fails because no comma is allowed. Is there a way to set custom separators or should I use other methods?
I use Delphi 10.2 and kbmMemTable 7.78.10.
Best regards
Hi,
You can update the global FormatSettings record, by setting the DecimalSeparator.
Alternatively you can use OnFilterRecord event where you are in full control of the filtering.
best regards
Kim/C4D
Hi,
thanks for the fast answer but I can’t change the global FormatSetting, because the rest of the application should use the region specific separator. The other method could work but is not very central and also not very clean. Is there a other alternative? Or is it possible that something that help get implemented in the future?
Best regards
Hi,
7.84.00 will contain 3 new filter expression functions: CASTTONUMBER/CASTTOFLOAT (same), CASTTOINT and CASTTOSTRING
They will use the FormatSettings of the TkbmMemTable instance to do appropriate conversion.
Hence you will be able to use one format settings for general application use, and another for memtable. Also remember you can attach multiple memtables to a base one, sharing data, but they can have different formatsettings too.