Cache data using only ODAC components

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Dmlvc
Posts: 17
Joined: Tue 27 Jun 2006 13:28

Cache data using only ODAC components

Post by Dmlvc » Tue 06 Mar 2007 14:44

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!

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 07 Mar 2007 12:08

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.

Dmlvc
Posts: 17
Joined: Tue 27 Jun 2006 13:28

Post by Dmlvc » Fri 09 Mar 2007 08:12

Thank You very much! We will take into account your advise. I have read about new features of version 6 - it is very interesting for us. Hence there is one more question - when do you intend to produce final release of new ODAC version?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 12 Mar 2007 08:36

We cannot tell you exact date of the ODAC 6 final release, but this will
happen in the nearest future.

Post Reply