Length of index key 
Author Message
 Length of index key

1)

***********************
Author: Robert Ladyman

Date: 1998/09/30
Forums: microsoft.public.fox.programmer.exchange

Maximum index length varies with COLLATE setting : either 100 or 240
(240 for machine I think).
***********************

Thank you, Robert, for the explanation about the index key length. I
have been looking around in the VFP Help file, but I haven't found
anything about it. This is what I read in the Help (under INDEX ON)

"The length of an index key for an .IDX index must be between 1 and 100
characters. The length of an index key for a .CDX index must be between
1 and 240 characters."

VFP doesn't seem to give any other information about the length of the
key. So, it seems that I can use a key of 240 characters in CDXs.
Nevertheless, it seems that Robert is right, because in some situations
I've been told that my PRG returns an error message. I cannot test it,
because the PC which returns the error is not in my country and I cannot
check what kind of default collation setting they are using in the other
PC, but it seems that changing the table's field length from 150 to 90,
fixes the problem...

Can anybody tell me where is the documentation about this matter?...

2)

Also, I am feeling quite imbarassed when I read (in the same Help page):

"If a field is empty, it *may* be necessary to enter some temporary data
in the field in the first record to prevent a 0 length index key."

What does it mean: "It *may* be necessary"??? Eather it *is* necessary,
or it is *not*! Or does it depend on the mood of the PC?...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Loris Antonangeli, University of Oulu (Finland)
phone: +358-8-5565456, +358-40-5015645

http://www.***.com/ ~loris/loris.htm

Messages FOR FREE straight to my GSM-phone - follow instructions:
1) Go to http://www.***.com/
2) Choose Network "Finland Telecom Finland 35840"
3) Enter my gsm-phone number +358405015645
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ennen olin ep?varma - nyt en oikein tied?...



Sun, 01 Apr 2001 03:00:00 GMT
 Length of index key

Quote:

>Also, I am feeling quite imbarassed when I read (in the same Help page):

>"If a field is empty, it *may* be necessary to enter some temporary data
>in the field in the first record to prevent a 0 length index key."

>What does it mean: "It *may* be necessary"??? Eather it *is* necessary,
>or it is *not*! Or does it depend on the mood of the PC?...

It means that if you have a multi-field index and one of the fields is going
to be emptym, you _may_ have to enter some temporary data into a field if
the index key is going to be 0 length, but not if it isn't going to be.

Andy D



Sun, 01 Apr 2001 03:00:00 GMT
 Length of index key
I had to deduce this from the entries in SET Collate and Index On - I
initially discovered it by error, also (lucky me). I could find no
explicit explanation in the help file but the entries in the on-line
documentation that were most relevant were:-

Performance tuning tips: "non-machine index keys are twice as large..."
Chapter 7, Developer's guide: working with tables: "Using other index types".
Technical reference: "Maximum number of bytes per index..."


Quote:
> Thank you, Robert, for the explanation about the index key length. I
> have been looking around in the VFP Help file, but I haven't found
> anything about it. This is what I read in the Help (under INDEX ON)

[snips]


Sun, 01 Apr 2001 03:00:00 GMT
 Length of index key
Loris
The Help topics "Index file structure" and "Compact index file structure"
may give more clues.
-Anders
Quote:

>1)

>***********************
>Author: Robert Ladyman

>Date: 1998/09/30
>Forums: microsoft.public.fox.programmer.exchange

>Maximum index length varies with COLLATE setting : either 100 or 240
>(240 for machine I think).
>***********************

>Thank you, Robert, for the explanation about the index key length. I
>have been looking around in the VFP Help file, but I haven't found
>anything about it. This is what I read in the Help (under INDEX ON)

>"The length of an index key for an .IDX index must be between 1 and 100
>characters. The length of an index key for a .CDX index must be between
>1 and 240 characters."

>VFP doesn't seem to give any other information about the length of the
>key. So, it seems that I can use a key of 240 characters in CDXs.
>Nevertheless, it seems that Robert is right, because in some situations
>I've been told that my PRG returns an error message. I cannot test it,
>because the PC which returns the error is not in my country and I cannot
>check what kind of default collation setting they are using in the other
>PC, but it seems that changing the table's field length from 150 to 90,
>fixes the problem...

>Can anybody tell me where is the documentation about this matter?...

>2)

>Also, I am feeling quite imbarassed when I read (in the same Help page):

>"If a field is empty, it *may* be necessary to enter some temporary data
>in the field in the first record to prevent a 0 length index key."

>What does it mean: "It *may* be necessary"??? Eather it *is* necessary,
>or it is *not*! Or does it depend on the mood of the PC?...

>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Loris Antonangeli, University of Oulu (Finland)
>phone: +358-8-5565456, +358-40-5015645

>http://cc.oulu.fi/~loris/loris.htm

>Messages FOR FREE straight to my GSM-phone - follow instructions:
>1) Go to http://www.mtn.co.za/sms/secure/text.html
>2) Choose Network "Finland Telecom Finland 35840"
>3) Enter my gsm-phone number +358405015645
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Ennen olin ep?varma - nyt en oikein tied?...



Sun, 01 Apr 2001 03:00:00 GMT
 Length of index key

Quote:


> >Also, I am feeling quite imbarassed when I read (in the same Help page):

> >"If a field is empty, it *may* be necessary to enter some temporary data
> >in the field in the first record to prevent a 0 length index key."

> >What does it mean: "It *may* be necessary"??? Eather it *is* necessary,
> >or it is *not*! Or does it depend on the mood of the PC?...

> It means that if you have a multi-field index and one of the fields is going
> to be emptym, you _may_ have to enter some temporary data into a field if
> the index key is going to be 0 length, but not if it isn't going to be.

> Andy D

Do you (and Fox) mean that if the index key is going to be 0 length, I
*may* have to enter some temporary data, but if the index key isn't
going to be 0 length, I *may* not have to enter temporary data...

I see... Now I know why it's called FoxPro, and not - for instance -
DonkeyPlus...

Thank you...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Loris Antonangeli, University of Oulu (Finland)
phone: +358-8-5565456, +358-40-5015645

http://cc.oulu.fi/~loris/loris.htm

Messages FOR FREE straight to my GSM-phone - follow instructions:
1) Go to http://www.mtn.co.za/sms/secure/text.html
2) Choose Network "Finland Telecom Finland 35840"
3) Enter my gsm-phone number +358405015645
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ennen olin ep?varma - nyt en oikein tied?...



Sun, 01 Apr 2001 03:00:00 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Primary Keys/Index Keys Length

2. Primary Key and Index Key

3. Help, foreign keys and index keys

4. Help, Foreign keys and Index Keys

5. Help, foreign keys and index keys

6. keys vs primary keys vs indexes

7. Clustered index on primary key w/ foreign keys

8. ADOX.Indexes/ADOX.Key/Foreign Keys

9. How do I change a Primary Key Index to a Clusterd Index


 
Powered by phpBB® Forum Software