Re: [fpc-pascal] TSQLQuery UniDirectional and SaveToStream
Dimitrios Chr. Ioannidis wrote / napísal(a): Hi, Στις 6/2/2014 9:10 πμ, ο/η LacaK έγραψε: 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?) by the way, one of the uses of a unidirectional dataset, is the sequential manipulation of big datasets. One of those manipulation is to transform the data while exporting them. So IMHO it will be nice to undone the invalidation of the SaveToStream method for the UniDirectional datasets. May be a feature request ? I think so also ;-) -Laco. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TSQLQuery UniDirectional and SaveToStream
Hi, Στις 6/2/2014 9:10 πμ, ο/η LacaK έγραψε: 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?) by the way, one of the uses of a unidirectional dataset, is the sequential manipulation of big datasets. One of those manipulation is to transform the data while exporting them. So IMHO it will be nice to undone the invalidation of the SaveToStream method for the UniDirectional datasets. May be a feature request ? regards, -- Dimitrios Chr. Ioannidis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TSQLQuery UniDirectional and SaveToStream
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 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TSQLQuery UniDirectional and SaveToStream
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. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal