Limiting the amount of cached data in TOracleDataset

I have an application which retrieves large bitmap BLOBs (434kb per record) from a database table for onscreen display, all stored in a TOracleDataset. The problem I have is that by viewing each in turn, they are ALL then cached in local memory, and given their size, this is quite a drain on resources.

My first thought is to only pull the non-BLOB fields into the dataset, and then individually query for the BLOB field when the user selects a record. Ideally, though, I would rather keep it all within the dataset, to keep things easy. Is there any other method I should think about, for example, being able to limit the dataset's memory cache to a certain number of records?

----------------------
DOA3.4.6, D6, Ora8.1.7
 
If the application allows it, you could set TOracleDataSet.UniDirectional to True. The limitation is that you cannotr scroll back in the result set.
 
Yes, only I think having a uni-directional dataset is going to limit it's usefulness. I have now got my TOracleDataset reading all fields except the BLOB, and a TQuery querying to retrieve the BLOB separately on the dataset's OnDataChange event, and it all works very nicely. I was very impressed with how easy it was to export my BLOB into a TBitmap. Freeing the TLOBLocator each time stops my memory problem.

Thanks!
 
Back
Top