Board index » cppbuilder » How to Convert TDataSet to TADO Recordset
Sinead Bunyan
![]() CBuilder Developer |
Sinead Bunyan
![]() CBuilder Developer |
How to Convert TDataSet to TADO Recordset2007-08-23 07:29:22 PM cppbuilder107 Hi, I would like to be able to pass a TDataSet to the following function which requires an ADO Recordset: Rpt->Database->SetDataSource((Variant)ADOQuery1->Recordset,(Variant)3,(Variant)1); Instead of passing an ADOQuery I would like to pass a TDataSet (i.e either a BDE Query or Table). Thanks in advance, Sinead |
Vassiliev V. V.
![]() CBuilder Developer |
2007-08-23 10:25:44 PM
Re:How to Convert TDataSet to TADO Recordset
You will have to creaet a wrapper, for example, using simple OLEDB provider.
It is not an easy task. //------------------------------------------ Regards, Vassiliev V. V. www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Sinead Bunyan" < XXXX@XXXXX.COM >???????/???????? ? ???????? ?????????: news: XXXX@XXXXX.COM ... QuoteHi, |
Sinead Bunyan
![]() CBuilder Developer |
2007-08-24 12:25:02 AM
Re:How to Convert TDataSet to TADO Recordset
Hi Vassiliev,
Thank you for your help on this, at least now I know that it is possible and can work from there. Is there any possibility that you may be able to provide me with an example of such a wrapper? Thanks again for your help. Regards, Sinead "Vassiliev V. V." < XXXX@XXXXX.COM >wrote in message QuoteYou will have to creaet a wrapper, for example, using simple OLEDB {smallsort} |
Clayton Arends
![]() CBuilder Developer |
2007-08-24 12:35:44 AM
Re:How to Convert TDataSet to TADO RecordsetQuoteThank you for your help on this, at least now I know that it is possible what functionality you are after. There might be other alternatives that you can pursue once a little more is known about your problem. - Clayton |
Sinead Bunyan
![]() CBuilder Developer |
2007-08-24 01:02:37 AM
Re:How to Convert TDataSet to TADO Recordset
Hi Clayton,
I am basically incorporating Crystal Reports 11 into an existing c++ project. Previously we had used a component from a company called Suprasoft, which allowed us to pass a TDataSet to report templates and using TTX files we could display our reports accordingly. In this way we did not have to specify the data location when designing the reports. However (!), we now are faced with using Crystal Reports 11, which requires that data be passed to the reports as an ADO recordset. Because it is an existing project, all datasets are created and ideally we would like a way to work from the existing datasets - we do not want to change all TDataSet components to TADODataSets and also we do not want to have to generate these datasets twice (once to populate our TDataSet, and once to populate a TADODataSet). Hopefully this is making sense? Any suggestions would be greatly appreciated - I have a very limited knowledge of ADO objects, sorry for my ignorance on this subject! Thanks in advance, Sinead "Clayton Arends" < XXXX@XXXXX.COM >wrote in message Quote>Thank you for your help on this, at least now I know that it is possible |
Vassiliev V. V.
![]() CBuilder Developer |
2007-08-24 03:21:04 AM
Re:How to Convert TDataSet to TADO Recordset
Intent was really to persuade you to not continue in this direction. Did
Crystal Reports stopped support BDE? If not, you could connect to BDE tables directly, without datasets. Or connect to DBF/Paradox files with Jet OLEDB provider (there may be problems with update Paradox tables, but in read-only mode this may work). If you still want to continue with creating recordset wrapper for TDataSet (in this case through special OLEDB provider), look at: www.dataweb.de/en/support/articles/ospdelphi/ospdelphi.html msdn2.microsoft.com/en-us/library/aa160399(office.11).aspx However it could take much more time and efforts than you expect. //------------------------------------------ Regards, Vassiliev V. V. www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Sinead Bunyan" < XXXX@XXXXX.COM >???????/???????? ? ???????? ?????????: news: XXXX@XXXXX.COM ... QuoteHi Clayton, |
Harold Howe [TeamB]
![]() CBuilder Developer |
2007-08-27 02:28:46 PM
Re:How to Convert TDataSet to TADO Recordset
Sinead Bunyan wrote:
QuoteHowever (!), we now are faced with using Crystal Reports 11, which data from a TDataSet into a disconnected TADODataSet, and then pass the RecordSet property of the TADODataSet to crystal reports? H^2 |