Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CURSOR Experiencing Memo Bloat
Message
De
16/07/2006 18:55:01
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
16/07/2006 14:32:31
John Onysko
1 Edi Source, Inc.
Hudson, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01136610
Message ID:
01136831
Vues:
13
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform