Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Gerrit Broekhuis
  Where is Gerrit Broekhuis?
 Holten
 Netherlands
 Gerrit Broekhuis
 Tags
Subject: RE: problem indexing cursor
Thread ID: 104518 Message ID: 104521 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Thursday, August 17, 2006 11:32:33 AM         
   


> Hi,
>
> For some reason indexing a cursor fails in my application startup prg:
>
> CREATE CURSOR bestanden (naam c(254), grootte N(10), modidate D)
> SELECT bestanden
> INDEX ON naam TAG naam
> SET ORDER TO naam
>
> I get the following errors:
> - invalid key length
> - variable "NAAM" is not found
>
> What am I overlooking?
>
> Regards, Gerrit


From HELP:

Maximum # of bytes per index key in a non-compact index. - 100
Maximum # of bytes per index key in a compact index. - 240

If the collating sequence is set to MACHINE, each character uses one byte. If the collating
sequence is not set to MACHINE, each character uses two bytes. If the indexed field supports
null values, one additional byte is used in the index key. Note that non-machine indexes are
always compact.

You have index expression with 254 bytes.
And you get variable "NAAM" is not found becuase VFP can't create Index.



Borislav Borissov



ENTIRE THREAD

problem indexing cursor Posted by gerrit broekhuis @ 8/17/2006 11:24:22 AM
RE: problem indexing cursor Posted by Borislav Borissov @ 8/17/2006 11:32:33 AM
RE: problem indexing cursor Posted by gerrit broekhuis @ 8/17/2006 11:54:27 AM