Reputation: 17118
First, please don't ask me why I need to do this. Unless you can tell me how to convert a TFDDataset directly to a _RecordSet, please, don't ask. :-)
So, this is my question:
Give a TFDDataset, how can I convert that dataset into a TADODataset?
The TFDDataMove component will only move to a FireDac dataset, not to anything else.
What strategy would you recommend? Brute force (iterate over fields and records...) is the only thing I can think of, but perhaps I'm missing some easier or better way.
Thanks.
Upvotes: 2
Views: 1055
Reputation: 37211
OK, I ported it to Delphi XE4 and also started adding bookmark support so you can hook it with a TADODataSet
and use TDataSource
and data-aware controls. There still seems to be a little bug somewhere which causes the dbgrid raise a "grid index out of range" error if you navigate to the last record immediately after switching to the ADO dataset. Anyway, here's what I have.
Merry Christmas, Nick!
Test project: Project1.dpr, Unit1.pas, Unit1.dfm
Upvotes: 4