>>May I ask why you're using STR() to index and not another function?
>
>
>Hi George,
>
>There are many different reasons. One of them is that we have to maintain a large number of tables (being run for over 16 years) which simultaneous accessed by different programs written in FPD2 and the latest version of VFP. Such tables do not use surrogate keys (although surrogate key is our standard for other projects). A numeric field very often takes part in forming a primary key (something like Str(MastRecID)+Str(ChildRecID)). Although the VFP programs are enhanced every year, the structure and the indexes of the tables can't easily be changed due to a number of constraints.
>
>
Ben,
I know that it's too late to change this, and please don't take this personally. Unless the numeric values are used in a calculation of some sort, then I wouldn't have used numerics at all, but rather character fields. For one, you can aviod the additional overhead of the function calls. Two, you can store a larger range of values.
For example, numeric 5, 0 can only 100,000 possible values (assuming no negatives). By contrast, using character 5 and limiting the values to 0-9 and A-Z, you have 36^5 possibilities.
George
Ubi caritas et amor, deus ibi est