Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CURSOR Experiencing Memo Bloat
Message
From
16/07/2006 18:55:01
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
16/07/2006 14:32:31
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01136610
Message ID:
01136831
Views:
12
>Amen to that, if I only had the power to do so. What a mess...

Couple of ideas... it's Sunday, and I'm idle :).

What if this was a Create Cursor instead of a select ... readwrite? You could easily replace the original

select ... into cursor mycursor readwrite nofilter

with

select ... into cursor myTemp
afiel(aStru)
create cursor mycursor from array astru
append from dbf("mytemp")
use in mytemp

Another thing... why don't you zap the cursor from time to time? Whenever it bloats enough...

select mycursor
scatter name oRec memo
zap
insert into mycursor from name oRec

Since it has only one record, this may be faster than select "from me into me".

Not that I'm betting the farm that either of these would prevent the bloat - I think df's analysis is true, that bloat happens whenever the replaced string is longer than the previous value AND crosses the block boundary - because VFP doesn't store the allocated length.

BTW... what if you padded it with chr(0) to the max length (the "longest +20%" measure) each time? Then the size wouldn't vary, and it just wouldn't bloat. Provided, of course, that the code which uses the memo won't mind the padding.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform