Michael Van Canneyt wrote:


On Tue, 1 Oct 2013, Dennis Poon wrote:

Since TBufDataSet is in-memory, to speed things up, how can I directly access the N'th record and M'th field's value as Variant?

Simply said: You cannot.


Can any one suggest an in-memory dataset in fpc/lazarus that allows direct access?

Does TMemDataset allow it?

No. The architecture of TDataset does not allow this.

The buffer mechanism is quite complicated, and there are quite some layers to go through.

T(Mem)Dataset is not just an array of records. The records can be at wildly different locations, the values may or may not be computed. Blobs are stored entirely in different locations etc.

Michael.


That is too bad. I used to use TdxMemData from "DevExpress" and it allows such direct access.

The benefit is record can be accessed without CHANGING the current record pointer which will trigger updating of all linked DB controls (that could be time consuming or even confusing to the user).
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to