Using MemData - Loading from actual DataSet

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
w0wbagger
Posts: 7
Joined: Wed 24 Aug 2005 20:23

Using MemData - Loading from actual DataSet

Post by w0wbagger » Sat 24 Jul 2010 20:22

Hi everyone, I've finally updated to RAD Studio 2010 from C++ Builder 6 (!!), and am trying to convert my codebase. I was previously using the Jedi VCL, which was great, but am trying to pare down the number of 3rd party libraries I use.

One of the features I used in jVCL was their TJvMemoryData. I see that the MySQL Library has a TMemDataSet, but I was wondering if there's an easy way to open a dataset from the database using a regular TQuery and then copy it into the TMemDataSet for storage.

The jVCL had a function called LoadFromDataSet that handled this. Is there a better approach for this? What I use it for mainly is to populate drop-downs and comboboxes where I don't want to have to generate a whole new query (they are data driven), so instead can just generate it from the TJvMemoryData, which is much faster.

Thanks for any guidance you can give me.
Ian

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 26 Jul 2010 09:21

You can use TVirtualTable for this. TVirtualTable is inherited from the TMemDataSet component and it stores data in memory and does not have linked data files. You can find more detailed information about this component in the MyDAC help.

Post Reply