clone dataset lazarus / 16-Databases ---------------------------------------------------------------------- xinyiman · 2013-12-12 16:19 How do I clone a dataset connected to a dbgrid? ---------------------------------------------------------------------- BigChimp · 2013-12-12 17:41 Have you found this one http://forum.lazarus.freepascal.org/index.php/topic,22838.msg135471.ht ml#msg135471 ---------------------------------------------------------------------- marcov · 2013-12-12 17:55 Isn't there a TMemdataset.CopyFromDataset to make that easier? ---------------------------------------------------------------------- BigChimp · 2013-12-12 18:19 Yes, but xinyiman didn't say what kind of dataset he's using.  Bufdataset etc have no copyfromdataset. I also recall Lacak2 posting a method using savetostream/readfromstream somewhere else in the forum. ---------------------------------------------------------------------- marcov · 2013-12-12 18:25 True. There is http://bugs.freepascal.org/view.php?id=18779 for that ---------------------------------------------------------------------- BigChimp · 2013-12-12 18:32 Maybe OP would like to provide a patch ---------------------------------------------------------------------- xinyiman · 2013-12-12 19:31 I need a method that clones a dataset any, I want to be able to reuse the method. However, my dataset is of type TBufDataSet and I want to consult it without interacting with the original TBufDataSet. ---------------------------------------------------------------------- BigChimp · 2013-12-12 19:55 Did you read the code in the link I posted? Did you try it? What didn't work? What error messages do you get? ---------------------------------------------------------------------- xinyiman · 2013-12-12 20:08 And I need to clone the dataset during the event BeforePost the dataset. This sends the loop the program. ---------------------------------------------------------------------- BigChimp · 2013-12-12 20:19 Ok. Let us know how that goes. ---------------------------------------------------------------------- xinyiman · 2013-12-12 20:24 Maybe addressing the root problem solve the same, you know, tell me how to set the TBufDataset in such a way that the column does not allow duplicate article? So I would answer. ---------------------------------------------------------------------- BigChimp · 2013-12-12 20:33 Sorry, not interested in continuing without info. Bufdataset source code is open; you can have a look yourself. ---------------------------------------------------------------------- xinyiman · 2013-12-12 20:35 ok thank you