[fpc-pascal] TSQLQuery UniDirectional and SaveToStream

Dimitrios Chr. Ioannidis d.ioannidis at nephelae.eu
Thu Feb 6 09:39:26 CET 2014


Hi,

Στις 6/2/2014 9:10 πμ, ο/η LacaK έγραψε:
> Dimitrios Chr. Ioannidis wrote / napísal(a):
>> 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 ;-)

Thx for the hint.

I already tried that with no success. There is a lot more involved reg. 
the ScrollResult of the UniDirectional instance of the BufDataset.

So i just used the TXMLXSDExporter from the DataExport. At least for the 
simple dataset i want to transfer it's ClientDataSet export format is 
working fine.

thx,

-- 
Dimitrios Chr. Ioannidis



More information about the fpc-pascal mailing list