Andrzej 0 Posted May 10, 2022 I make examples after https://www.kvrsoft.com/articles/delphi-articles/database/db-controls.html. Also I see TGXBaseDataset and Paradox dataset from Github (I save here too many links) I attach example. It is half succeeded: - is numer of records - record nubers are continuus from start to last - two defined columns But I can't make any field visible, only header fields are visible. How make even fake field data iike 'abc'? I attached dpk with two components and test app. send.zip Share this post Link to post
miab 25 Posted May 10, 2022 Why don't you use?: -kbmmemtable -clientdataset -fdmemtable -zmemtable Michał 1 Share this post Link to post
rvk 33 Posted May 10, 2022 Isn't that just like the standard TClientDataSet? Or am I missing something? https://docwiki.embarcadero.com/Libraries/Sydney/en/Datasnap.DBClient.TClientDataSet Share this post Link to post
Andrzej 0 Posted May 11, 2022 (edited) Must be simple, free with sources, no sql. I will next create other based on it, for example read data from csv files. Own DataSource is simpler than own DataSet? Edited May 11, 2022 by Andrzej Share this post Link to post
rvk 33 Posted May 11, 2022 I see that the code is a mess concerning the use of override instead of overload. If you compile this, watch all the warnings you get (and fix them). I think TDataSet has changed since the creation of this additional code and you now need to use overload on many places. Otherwise your own SetData etc aren't executed and your records aren't populated (which you are experiencing). You'll notice the execution of your code never reaches your EditDataSet1PerformSetFieldData() event. Share this post Link to post
rvk 33 Posted May 11, 2022 And is there a reason not to use the traditional Insert etc. Like EditDataSet1.Insert; EditDataSet1.FieldByName('number').AsString := 'a'; EditDataSet1.FieldByName('square').AsString := 'b'; EditDataSet1.Post; Share this post Link to post
Fr0sT.Brutal 900 Posted May 11, 2022 Clientdataset seems a good idea but it requires stupid midas.dll IIRC. Alas, the implementation should be as simple as, f.ex., TStream descendant, but it's too complex actually. There was Marco Cantu's article "A Dataset with no Database" (link is obsolete now) which I used to create my own primitive implementation when I needed a grid with word wrapping. For simplicity it's only able to store strings. Share this post Link to post
Uwe Raabe 2057 Posted May 11, 2022 1 hour ago, Fr0sT.Brutal said: Clientdataset seems a good idea but it requires stupid midas.dll IIRC. Not when you add MidasLib to the uses clause. 1 Share this post Link to post
Fons N 17 Posted May 11, 2022 40 minutes ago, Uwe Raabe said: Not when you add MidasLib to the uses clause. It's been a very long time ago, so my info might not be correct now, but as far as I can remember there is a bug in MidadLib that does not exist in midas.dll. As stated, it might not be the case any longer. Share this post Link to post
Andrzej 0 Posted May 11, 2022 (edited) With overload - start working. I attach sample: with IntToStr(FCursor) But it fill all visible rows of grid with this value. Probably I must use cache but I don't know how much visible rows has grid in dataset. What is standard way to do with them? send2.zip solution: ActiveBuffer: IntToStr(PRecordBuffer(ActiveBuffer)^.RecordIndex); give me correct Edited May 11, 2022 by Andrzej soltion Share this post Link to post
Greg Bishop 0 Posted May 11, 2022 Have a look at the AdapterBindSource example. It's installed by Delphi, on my machine at: C:\Users\Public\Documents\Embarcadero\Studio\21.0\Samples\Object Pascal\LiveBindings\AdapterBindSource. Share this post Link to post