i have this error :
Field "EVALUATION" has an invalid field type (BCD) to index on'
EVALUATION is a ftBCD type.
the exception is in file fpc\2.6.4\source\packages\fcl-db\src\base\bufdataset_parser.pp because ftBCD isn't
in the case of the TBufDatasetParser.HandleUnknownVariable(VarName: string) procedure.
Is it possible to add ftBCD in the case of this procedure or is it too dangerous ?
Hi,
it is not so simple IMHO.
As you see in bufdataset_parser.pp there are T...IntFieldVar objects.
So at least we must create new TBCDFieldVar.
But as far as bufdataset_parser depends on dbf_prscore and dbf_prsdef where is defined TExpressionType = (etInteger, etString, etBoolean, etLargeInt, etFloat, etDateTime, ...) ... it would ge good also add here etBCD, plus in other places handle it.
As a hack we can introduce TBCDFieldVar, which will internaly convert BCD values to Float values and will report own expression type as etFloat ... of course it can lead to rounding errors in same cases ...