Page 1 of 1

Coverting a TMyQuery dataset to TClientDataSet in Delphi

Posted: Wed 14 Jan 2009 16:37
by CFaiga
Hi I make use of the Mydac components by devart (corelab) to access MySql from Delphi (2006) Very often I need to work with data in a TClientDataSet What is the best way to convert the dataset of a TMyQuery to TClientDataSet

Posted: Fri 16 Jan 2009 13:19
by Dimon
You can connect TClientDataSet to TMyQuery through the TDataSetProvider component.

Posted: Sat 17 Jan 2009 08:34
by CFaiga
Please can you show me some sample code

Posted: Mon 19 Jan 2009 13:41
by Dimon
You can use the following code:

Code: Select all

DataSetProvider.DataSet := MyQuery;
ClientDataSet.ProviderName := DataSetProvider;
After this you can use TClientDataSet.