> >> I need implements a similar structure but I need know if > the use of > >> Variant have very cost. > > > > > > It has a cost. > > > > The reason for using a buffer in tdataset is that a record's data > > normally is located in one continuous buffer, from which a value is > > picked from the right spot (including strings) You can't have that > > with variants. > > Hm... right. > So, if I will have a class like a TParam, that have FValue: > Variant attribute, Would you change the implementation to not > use Variant? >
Not sure what you want to do but as Michael explained, the internal format in tdataset is very much linked to the source of the data. Databases don't understand pascal variants. They use only strictly typed data on the wire. Using a variant as an internal format would only introduce overhead and eventually data loss (fe. precision on decimals) without any gain. The TField variant properties should be considered a convenience only and be avoided as much as possible. If your new class has no links with the outside world you can use whatever you want. Ludo _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal