Hello everyone,
I need some help with saving a Zeos query and a Zeos table to a memory stream. I would also like to know how to load a Zeos query and a Zeos table from a memory stream.
I've seen
ZQuery1.Properties.SaveToStream
ZTable1.Properties.SaveToStream
but I don't know how they really work.
Thank you for your kind assistance.
Save/load dataset and table to/from memory stream
Moderators: gto, EgonHugeist
IMO, there's no simple way to store data to a stream. This task will probably need some component coding. Loading from stream into component is another story (nearly impossible).
I still can't imagine why would you need this?
If you want to store data locally for fast lookup and offline work, take a look into Dephi's TClientDataSet component.
I still can't imagine why would you need this?
If you want to store data locally for fast lookup and offline work, take a look into Dephi's TClientDataSet component.
I think it is possible. You get the datafields, you convert them to something similar to a csv format, you add them to your string stream, repeat as needed, them you save your stream. To load a stream into component you do it in reverse order.
This kind of process can be usefull to make database dumps or batch exporting to other applications.
Hope this helps.
This kind of process can be usefull to make database dumps or batch exporting to other applications.
Hope this helps.
It is possible. I've seen it done with data components other than Zeos. Like trupka said, Delphi's TClientDataSet is one example. Another is Lazarus' TMemDataset & TBufDataset. RX Components' TRxMemoryData that works in Delphi & Lazarus also does this.
But these are client side components. I want Zeos on the server sending data to these client side components OR exporting data to other applications.
I can think of an XML solution but I want a working alternative in case the client side application cannot handle XML.
But these are client side components. I want Zeos on the server sending data to these client side components OR exporting data to other applications.
I can think of an XML solution but I want a working alternative in case the client side application cannot handle XML.
-
- Fresh Boarder
- Posts: 4
- Joined: 23.04.2020, 00:31
Re: Save/load dataset and table to/from memory stream
No one had progress with this feature?
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Save/load dataset and table to/from memory stream
Hello papelhigienico3,
it really depends on what you want to do. The Zeos Webservice Server, implemented for Zeos 7.3 does something like this. But saving and restoring a dataset usually ist not all that is to this. So - what do you want to do once you can save and load datasets?
Best regards,
Jan
it really depends on what you want to do. The Zeos Webservice Server, implemented for Zeos 7.3 does something like this. But saving and restoring a dataset usually ist not all that is to this. So - what do you want to do once you can save and load datasets?
Best regards,
Jan