Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Index Error
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Strange Index Error
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01571265
Message ID:
01571265
Views:
100
Hi Gang!

I am getting an error when I run a program called ssreceive.exe on my PC. Here is the error......

"Error building key for index 'c:\pharmacy\tables\ss_io.cdx' tab 'Unassdoc' "

According to MS, this error is from inclusing a memo file in the index......

"“This error is generated when index key truncation is about to occur, typically during index creation or modification such as with the INDEX command. This can happen with use of a key that contains an expression involving a Memo field, whose length in not fixed, such as in the following example:
INDEX ON charfld1 + memofld1 TAG mytag
An index file with truncated index keys is a source for potentially incorrect data results. Visual FoxPro does not allow for key truncation during index creation or modification. When index key truncation is about to occur, this error is reported. If you desire key truncation, you should adjust the index expression to explicitly truncate the key.
Due to issues associated with key truncation, the SQL engine (such as during a SQL SELECT command or View creation) might fail to build a temporary index to optimize a join evaluation if it is unable to accurately determine the maximum size of the key. This might cause the join to be evaluated as a Cartesian product and as a result could impact performance. To allow you to diagnose this issue, a message is included in the SQL ShowPlan, which is controlled by the SYS(3054) function. When this function value is greater than or equal to 11, the message "Error building temporary index" is included in the ShowPlan to indicate the key truncation problem. You can fix this problem by adjusting join conditions to make the key size more explicit and to allow the temporary index to be built successfully.
Occasionally, the SQL engine will build a temporary composite index (this is a special index created internally by the product and is not supported through the INDEX command). In this case, some parts of the index may cause key truncation, while others might not. During the first attempt to build the index, those parts which cause problems are identified. The offensive parts are then removed from the key and the index is built again without them. The SQL ShowPlan will indicate this problem, but it is still possible that the join can still be optimized using valid parts only.”


Here is the index key Unassdoc

“DTOC(when_sent)+doctor_last_name” (when_sent is a datetime field) (doctor_last_name is C(35))

And the Filter is “status = 5” for this key

There are NO Memos in this key.

I can go in and Rebuild Indexes, and sometimes this fixes it. Then when I run the code, the error reoccurs.


Since there are NO Memors, then why would the error occur.
Tommy Tillman A+ NetWork+ MCP
Next
Reply
Map
View

Click here to load this message in the networking platform