DataBase:SQL Server 2000
UniQuery+DataSetProvider+ClientDataSet,
QTY field is Numeric(12,2)
UniQuery.SQL.Text:='Select goodsid,sum(qty) from OrderDetail group by goodsid';
TFMTBCDField(UniQuery.FieldByName('qty')).Precision is 38
but TFMTBCDField(ClientDataSet.FieldByName('qty')).Precision is 32,
ClientDataSet qty field value is not correct or wrong
TFMTBCDField.Precision Problems??
any value,if sum Numeric(Decimal) field ,sorry,my english is very poor!Plash wrote:TClientDataSet does not support precision more than 32.
Please specify what is correct value of the field and what value you get in TClientDataSet.
you can test ,but ClientDataSet.Fieldbyname('f1').value is 0.5,is error
Select cast(1 as numeric(38,2)) as F1
midas.dll not can change,i'm now change OLEDBAccessUni.pas is ok!!!
procedure TOLEDBRecordSet.InternalInitFields;
...............
{$IFDEF VER6P}
{$IFNDEF FPC}
dtFmtBCD:
begin
//Wise Fix
if Precision>32 then
Field.Size:=32
else if Precision 32 then
Field.Length:=32;
end;
{$ENDIF}
{$ENDIF}