So i could just catch exceptions and everything would be fine i guess ?
Well, with capturing the exception your program will continue to run but the record isn't written to the database (so what use is the database then?).
Best option is to use parameterized queries like I showed.
Second best is to use Thaddy's suggestion (TFormatSettings).
There is a FloatToStr where you can pass the TFormatSettings.
So in that example you pass settings to FloatToStr.
https://www.freepascal.org/docs-html/rtl/sysutils/floattostr.htmlThird option is putting the variable into a string temporally and change the , to a .
Then construct the sql from those temp strings.
Don't do that directly in the sql because it becomes a mess.
Fourth option is like you did it. But putting it all in one statement really makes it unreadable.
Fifth option is capturing the exception.
In which case the record isn't written to the database and the whole DB becomes useless.