[Lazarus] TBufDataSet, TMemDataSet and a big headache.
Marcelo B de Paula
marcbp at terra.com.br
Tue Jul 13 17:23:05 CEST 2010
Thanks Joost for the answer.
I forgot to mention that i am using Lazarus trunk (0.9.29 rev 26602) with
fpc 2.5.1.
I just mentioned TClientDataset because of others said here in the list and
in Lazarus forum.
My concern is that the component seems to be incomplete e can cause some
user headache and needs to be bug reported.
If it is available in component palette, IMHO, it could offer more in design
time, and not assume
that the final user will know that he must do all the stuff in code.
BTW, if someone has some sample of its use, please send it to me.
Thanks in advance.
Joost van der Sluis joost at cnoc.nl Tue Jul 13 13:05:53 CEST 2010
On Mon, 2010-07-12 at 20:58 -0300, Marcelo B de Paula wrote:
> Hi list,
>
> As the subject of this post suggest, i am in trouble with these
> components.
>
> I read that TMemDataSet was similar to Delphi´s TClientDataSet as memory
> dataset. But i also read that people was using TBufDataSet instead of
> TMemDataSet.
TMemDataset is a memory dataset, has nothing to do/in common with
TClientDataset, except that it it a dataset that keeps data in memory.
(A lot of datasets do that)
TBufDataset looks like the TClientDataset. But do you really need
TClientDataset behaviour?
But there are some small bugs in older Lazarus and Fpc versions, which
can be fixed with only a few lines of code, but from the rest of your
mail I think it is best to advise to upgrade. Use a Lazarus 0.9.29
snapshot with at least fpc 2.4.1.
> What´s the best option if you want to work with memory datasets?
>
> IMHO, bufdataset looks like an incomplete component. It does not have an
> option to "create dataset" as memds has. But what confuses me the most is
> the property editor accessed through context menu (right click component).
> We already have a property editor assigned to fielddefs and accessed in
> object inspector.
>
> What exactly is this property editor for? Its option "Add fields"
> (ctrl+ins)
> always give me the error "Abstract Method Called", and the other available
> option "New" (ins), opens the New Field dialog with two possible options:
> "Calculated" and "Lookup".
>
> But how this is useful if bufdataset do not have an "OnUpdateError" event
> published? It does not have an OnCalcFields event, so what is this
> "calculated" field for?
You can access the OnCalcFields event from code. I think it's published
in later versions.
And a general tip: when reporting problems on this ml, always mention
your OS, OS version, fpc and lazarus version.
Joost.
More information about the Lazarus
mailing list