Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A little tip
Message
From
07/09/2003 19:29:43
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00826775
Message ID:
00826918
Views:
30
Hi Sergey,

The minimun 1 character is not true for every case.

If memo is nullable, VFP build a index 1 byte lenght, BUT THIS IS ONLY FOR NULL VALUE
CREATE CURSOR mCursor (a M NULL)
INDEX ON RTRIM(A) TAG TAG2		&& NO ERROR
INSERT INTO mCursor VALUES (NULL)
INSERT INTO mCursor VALUES ('')
INSERT INTO mCursor VALUES ('C')
? KEYMATCH(NULL),SEEK(null),RECNO()
? KEYMATCH(''),SEEK(''),RECNO()
? KEYMATCH('C'),SEEK('C'),RECNO()		&&
? KEYMATCH(' '),SEEK(' '),RECNO()
If memo is not nullable, VFP build a index only if you are on a key with lenght>0
CREATE CURSOR mCursor (a M NOT NULL)
INDEX ON RTRIM(A) TAG TAG2		&& ERROR
INSERT INTO mCursor VALUES ('C')
INSERT INTO mCursor VALUES ('')	&& empty string
INDEX ON RTRIM(A) TAG TAG2		&& ERROR
INSERT INTO mCursor VALUES ('C')
INDEX ON RTRIM(A) TAG TAG2		&& OK
? KEYMATCH('C'),SEEK('C'),RECNO()	
? KEYMATCH(''),SEEK(''),RECNO()
Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform