Henry Olive 5 Posted August 1 Good Day Delphi 10.4 When i convert to a Float to Str i'm having comma, dot problem like below ItemNo := Table1ITEMNO.asString; Qty := Table1QTY.asString; (Original Value is Float) SQLText := 'SELECT * FROM MyProcedure (ItemNo, Qty)'; I copy sql to clipboard & clipboardt shows Qty value as 11,25 (According to my Windows setting) but Firebird Database requires Qty value as 11.25 ( with a dot, not a comma ) How can i convert 11,25 to 11.20 ? Thank You Share this post Link to post
Vandrovnik 214 Posted August 1 You can use FloatToStr and pass desired FormatSettings to it: http://docwiki.embarcadero.com/Libraries/Athens/en/System.SysUtils.FloatToStrF Regarding database, it is better and more safe to use SQL querries with parameters: SELECT * FROM MyProcedure(:ItemNo, :Qty) and then MyQuery.ParamByName('ItemNo').AsInteger:=1; MyQuery.ParamByName('Qty').AsCurrency:=11.25; Share this post Link to post