Hi,
In our application we have a field that was made too small. The field is used to name an event. It is currently a character field with a width of 30. We decided to make the field as long as possible without changing it to a memo field so I changed the field length to 250. When I clicked save in Stonefield I got the error "Invalid Key Length". After reading this MS web page,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_foxhelp/html/err112.asp, I discovered that an CDX must be between 1 and 240 characters. Since one of the indexes is a compound index using the name and some other fields I decided to shorten it to 200. I'm just not sure if that 240 limit applies to one index or all indexes based on the table. I made the structure of the table (omitting fields not in any index) look like this:
MyTable
MyPK I(4)
MyFK I(4)
MyName C(200)
MyActiveStatus C(1)
MyArchiveStatus C(1)
Indexes
1. MyPK (Primary Index)
2. MyFK
3. BINTOC(MyFK) + MyActiveStatus + MyArchiveStatus + UPPER(MyName)
I tested it and everything seems to work properly. But I'm not sure if by increasing the width of "MyName" so much that I might be creating a bug that won't be discovered until later. Any ideas? Is this safe?
Thanks,
Chris