Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore work differently in VFP9?
Message
From
10/03/2005 08:40:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Rushmore work differently in VFP9?
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00994380
Message ID:
00994380
Views:
85
Would some try this sample code in VFP8, then again in VFP9? On my machine the both queries run optimized in VFP8, but only the 2nd one in VFP9. I don't know what settings to check other than ANSI and EXACT. Could it be a problem with VFP9?

SET ANSI OFF
SET EXACT ON
CLEAR
* Turn rushmore reporting on
SYS(3054,2)
* Create a test cursor
CREATE CURSOR test (field C(10))
INDEX on field TAG field
INDEX on ALLTRIM(field) TAG field_t
* Put some data in the cursor
FOR i = 1 TO 10000
INSERT INTO test VALUES (SYS(2015))
ENDFOR
* Determine the last value
cValue = LEFT(test.field,LEN(ALLTRIM(test.field))-1)
* Try the untrimmed index
?"This one works"
?"---------------------------------"
SELECT * FROM test WHERE field = cValue INTO CURSOR index
* Try the trimmed index
?
?"This one does not work"
?"---------------------------------"
SELECT * FROM test WHERE ALLTRIM(field) = cValue INTO CURSOR noindex
Next
Reply
Map
View

Click here to load this message in the networking platform