Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CURSOR Experiencing Memo Bloat
Message
From
17/07/2006 02:54:38
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
 
 
To
16/07/2006 14:27:37
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01136610
Message ID:
01136864
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform