lacak at zoznam.sk
Wed Feb 23 07:45:44 CET 2011
Thinking about TFmtBCDField it seems to me, that also dsparams.inc must
be adjusted to support ftFMTBcd ... add AsBCD: TBCD etc. ... at least my
test with new TSQLite3Connection shows, that there is missing it (when
applyng updates to record)
Do you have already finished implementing ftFMTBcd into TSQLite3Connection ?
>> 4. Add 3th parameter to TryStrToBCD( const aValue : FmtBCDStringtype;
>> var BCD : tBCD; DecimalSeparator : char = #0) : Boolean;
>> so we can supply directly decimal separator '.' used in SQL and to avoid
>> saving existing, set '.' and then restoring ...
>> (like TryStrToDate, TryStrToTime)
>> add overloaded TryStrToBCD( const aValue : FmtBCDStringtype; var BCD :
>> tBCD; FormatSettings : TFormatSettings) : Boolean;
>> (like TryStrToFloat)
> And could you add a bug-report for this? I think that Marco or MvC
> should have a look at it and have to decide which design is best and
> also compatible to Delphi. Then the db-changes can be made.
Bug report is here http://bugs.freepascal.org/view.php?id=18807
If this way will be approved, then we can very nice use it (no need to
initialize something, store/restore) for example:
if not TryStrToBCD(bcdstr,bcd,SQLFormatSettings) then
we must only add into TSQLConnection:
property SQLFormatSettings: TFormatSettings read
FSQLServerFormatSetting already exists as private variable
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel