Hello, Core Lab! We purchased ODAC package with source code. Now we have to implement some special behavior of database components. In some mode Query and StoredProc must fetch data from Oracle database and save it to a file. In another mode those components must fetch saved data from the file and should not request the server. This behavior is like TClientDataSet’s one, but we do not like to use TClientDataset – TDataSetProvider – TOraQuery link because of performance loss. What solution can you advise us? We can implement some descendants of ODAC components and even make our own build of ODAC library, but we should know which classes are better to change.
Thank you!
Cache data using only ODAC components
You can use the TVirtualTable component to save data to a file and load it from a file. Call the AssignDataSet method of TVirtualTable to copy data from an ODAC dataset to the virtual table. Then you can save/load the data to/from a file using the SaveToFile and LoadFromFile methods of TVirtualTable.
Note: TVirtualTable.AssignDataSet method does not support Oracle specific field types.
In ODAC 6 we have added ability to save data to a file in all the ODAC datasets. So you will not need to copy data to a TVirtualTable component to save it. But anyway data will be fetched into the memory before you can save it.
Note: TVirtualTable.AssignDataSet method does not support Oracle specific field types.
In ODAC 6 we have added ability to save data to a file in all the ODAC datasets. So you will not need to copy data to a TVirtualTable component to save it. But anyway data will be fetched into the memory before you can save it.