[fpc-pascal] TSQLQuery UniDirectional and SaveToStream
LacaK
lacak at zoznam.sk
Thu Feb 6 08:10:15 CET 2014
Dimitrios Chr. Ioannidis wrote / napĂsal(a):
> Hi all,
>
> i will appreciate a little help / advice / anything for the
> following problem i'm having.
>
> I need to use the xmldatapacketreader to transfer datasets between
> free pascal and delphi.
>
> The problem i'm having is that i can't use UniDirectional and
> SaveToStream at the same time ( getting DataBaseError(SUniDirectional)
> ) and for big datasets the memory goes .....
>
> So, does anyone have any idea how to use xmldatapacketreader ( which
> implies SaveToStream ) and UniDirectional ?
>
As you can see there is CheckBiDirectional in the begining of
SaveToStream ...
I am not sure, why is there such check (may be that bookmarks are used
and bookmarks are not supported by unidirectional datasets?)
AFAIU saving is performed in sequential order from first record to last
... and update buffer is evaluated, but unidirectional dataset can not
have update buffer ... so at first look it seems, that saving can be
performed also on unidirectional dataset (as it supports First and Next
methods)
May be that CheckBiDirectional is there only for symmetricity with
LoadFromStream ... and LoadFromStream can not be performed on
UniDirectional datasets. (because they are not updateable and do not
handle cached updates)
What you can do is remove check: CheckBiDirectional in the begining of
SaveToStream ant try what happens ;-)
-Laco.
More information about the fpc-pascal
mailing list