Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FPT bloat
Message
De
12/12/2013 08:41:07
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01589991
Message ID:
01589996
Vues:
90
>Hi all,
>
>we have a file on the customer site that hits the 2gb limit every so often. The dbf and cdx are fine, it is the FTP that hits the limit. when this happens the ftp seems to clear itself out and hold no data. I can restore from a backup and they might lose half a days details, not good but it's something. What gets me is that when I restore from a backup and pack the file the FTP shrinks to 150-180mb. I don't lose any data, there just seems to be huge bloat in the file. I use the insert command to populate the file but it's a log file, it is never updated or modified after the fact. Any ideas what might be causing this?
>

To slow down growth of the FPT, never do code like this:
REPLACE MyMemo WITH MyMemo + "more info"
REPLACE MyMemo WITH MyMemo + "even more info"
REPLACE MyMemo WITH MyMemo + "still more info"
etc.
Instead, do it like this (I'm assuming there'd be a loop or something actually building up the string to add):
cNewInfo = ''
cNewInfo = m.cNewInfo + "more info"
cNewInfo = m.cNewInfo + "even more info"
cNewInfo = m.cNewInfo + "still more info"
REPLACE MyMemo WITH MyMemo + m.cNewInfo
Each time you REPLACE into the memo field, you discard the old data and put new data elsewhere. (That's not exactly right, but it's the right mental model to have.)

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform