Loading streams into a dataset lazarus / 16-Databases ---------------------------------------------------------------------- JD · 2015-04-01 16:17 Hi there everyone, I have a problem with loading streams into a dataset. I use sqldb server side & I had earlier saved the dataset to a stream using SaveToStream. On the client side, I created a TSQLQuery instance dynamically intending to use LoadFromStream to read the dataset sent by the server. However I abandonned it because the query instance required a database file client side. So I changed it to a ZMQueryDataset instance but that gives me an error saying "Missing (compatible) dataset, cannot open". I just want to load it into memory & then copy it into the controls on the client side GUI. Is this possible or should I change my strategy? Thanks a lot, JD ---------------------------------------------------------------------- LacaK · 2015-04-01 17:37 On server side do you use TSQLQuery.SaveToStream ? If so, then on client you can use TBufDataset, because TSQLQuery is descendant of TBufDataSet. And TBufDataSet does not require Database as it is client in memory dataset. ---------------------------------------------------------------------- JD · 2015-04-01 21:01 Quote from: LacaK on April 01, 2015, 07:37:37 pmOn server side do you use TSQLQuery.SaveToStream ? If so, then on client you can use TBufDataset, because TSQLQuery is descendant of TBufDataSet. And TBufDataSet does not require Database as it is client in memory dataset. Yes I used TSQLQuery.SaveToStream on the server side. Using TBufDataset on the client side gives exactly the same error which is to be expected because TBufDataset is the ancestor of ZMQueryDataset. ---------------------------------------------------------------------- LacaK · 2015-04-02 09:44 Strange! In same version of FPC binary format should be identical so Save/Load should work. Can you post here small compilabe project which shows error ? ---------------------------------------------------------------------- JD · 2015-04-03 08:31 Quote from: LacaK on April 02, 2015, 11:44:34 amStrange! In same version of FPC binary format should be identical so Save/Load should work. Can you post here small compilabe project which shows error ? I've decided to change the strategy. I've gone back to using my tried & trusted TCollections to send/receive data. Thanks