Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By Example in VFP 8
Message
From
23/07/2004 16:25:31
Luis Navas
Independent Consultant
Auckland, New Zealand
 
 
To
23/07/2004 06:42:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00926827
Message ID:
00927457
Views:
13
Thanks a lot.
Luis
>
>Thanks Fabio, just one question why should I Change This.Cajafecha2.Value with a variable?
>Luis
>

>
>Because VFP can reevaluate the property many times,
>and this is very slow
>
>
>CLEAR
>CREATE CURSOR myCursor ( f1 I)
>FOR k=1 TO 1000
>	INSERT INTO myCursor VALUES (RECCOUNT())
>NEXT
>INDEX ON f1 TAG f1
>x=CREATEOBJECT('myObject')
>x.myProperty	= 33
>* with a index
>x.AccessCount	= 0
>SELECT * INTO CURSOR TEMPORARY FROM myCursor WHERE F1=M.X.myProperty
>? "Accesses with Index :",m.x.AccessCount
>USE
>* without index
>x.AccessCount	= 0
>SELECT * INTO CURSOR TEMPORARY FROM myCursor WHERE F1+0 = M.X.myProperty
>? "Accesses without Index :",m.x.AccessCount
>
>DEFINE CLASS myObject AS Custom
>	myProperty = 0
>	AccessCount = 0
>	PROCEDURE myProperty_Access
>		this.AccessCount = m.this.AccessCount + 1
>		RETURN m.this.myProperty
>	ENDPROC
>
>ENDDEFINE
>
I never forget a face, but in your case I will make an exception :-)
Previous
Reply
Map
View

Click here to load this message in the networking platform