Print Thread
Limiting the amount of cached data in TOracleDataset
#6210 03/19/04 04:43 PM
Joined: Mar 2004
Posts: 2
United Kingdom
T
Member
OP Offline
Member
T
Joined: Mar 2004
Posts: 2
United Kingdom
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

Re: Limiting the amount of cached data in TOracleDataset
#6211 03/19/04 09:34 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
If the application allows it, you could set TOracleDataSet.UniDirectional to True. The limitation is that you cannotr scroll back in the result set.


Marco Kalter
Allround Automations
Re: Limiting the amount of cached data in TOracleDataset
#6212 03/19/04 10:06 PM
Joined: Mar 2004
Posts: 2
United Kingdom
T
Member
OP Offline
Member
T
Joined: Mar 2004
Posts: 2
United Kingdom
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!


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.026s Queries: 14 (0.008s) Memory: 2.5023 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-03 16:55:42 UTC
Valid HTML 5 and Valid CSS