Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CURSOR Experiencing Memo Bloat
Message
De
17/07/2006 02:54:38
Neil Mc Donald
Cencom Systems P/L
The Sun, Australie
 
 
À
16/07/2006 14:27:37
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:
01136864
Vues:
12
Hi,
I,ve modified Fabio's code to demonstrate the workaround
#define memoblocksize  64 && every
#define someintegers 	1  && > 0
#define threshold	someintegers * m.blocksize - 8 && memo block header = 8

lcText = SPACE(16000)
lnBigTextLength = LEN(lcText)

SET BLOCKSIZE TO memoblocksize
SET STEP ON 
CREATE TABLE tmemo FREE (mm m)

APPEND blank
CLEAR

? "exclusive", ISEXCLUSIVE()
TRY
	blocksize = VAL(SYS(2012))
 	SET COMPATIBLE on
 	replace mm WITH lcText
	memosize = FSIZE(FORCEEXT(DBF(),"fpt"))

	 FOR k=0 TO 100
			IF MOD(k,2) <> 0
				lcTextin = SPACE(100)
	 		ELSE 
				lcTextin = SPACE(3000)
	 		ENDIF 
			lnNoBlanks = lnBigTextLength-LEN(lctextin)
 			replace mm WITH lcTextin+SPACE(lnNoBlanks)
	 		FLUSH
	 		? "memo size",ALLTRIM(STR(LEN(mm))),"add blocks",;
	 		ALLTRIM(STR((FSIZE(FORCEEXT(DBF(),"fpt"))-m.memosize)/VAL(SYS(2012)))),;
	 		"file size",ALLTRIM(STR(FSIZE(FORCEEXT(DBF(),"fpt"))))
	 		memosize=FSIZE(FORCEEXT(DBF(),"fpt"))
 	 NEXT 
 FINALLY
	USE 
	CLOSE TABLES all

 	SET COMPATIBLE off
 ENDTRY
Regards N Mc Donald
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform