Yes,
You're assuming right, for numeric data VFP does that :)
Cetin
>Hi
>
>So I assume it is doing the equivalent of a Val() on the search string is that correct? If so then I guess it is working correctly because using Val() on any of my search strings would product Zero which is in the index for the second example.
>
>This only happened because the file was indexed incorrectly. It should have been indexed on Str(Number,5). I never knew that VFP allowed you to search a numeric index for a character string. When I first discovered it I expected it to give me an error message.
>
>Thanks
>Simon
>
>
>>>Hi
>>>
>>>I had a strange problem with a program an discovered that the index had been created on a numeric value while the seek() was searching for a character expression. I got the following strange results when Zero was one of the values in the table. Is this a bug in the Seek() function?
>>>
>>>I am using VFP 7.0 SP1 and WinXP Pro SP1. I get the same results in VFP 8.0 SP1.
>>>
>>>
>>>
>>>Create Table UPTest (Number N(5,0))
>>>Select UPTest
>>>Index On Number Tag Number
>>>Insert Into UPTest (Number) VALUES (1)
>>>Insert Into UPTest (Number) VALUES (2)
>>>Insert Into UPTest (Number) VALUES (3)
>>>
>>>? Seek("Mary","UPTest","Number")
>>>
>>>? Seek("mary","UPTest","Number")
>>>
>>>? Seek("0Mary","UPTest","Number")
>>>
>>>Insert Into UPTest (Number) VALUES (0)
>>>
>>>? Seek("Mary","UPTest","Number")
>>>
>>>? Seek("mary","UPTest","Number")
>>>
>>>? Seek("0Mary","UPTest","Number")
>>>
>>>
>>>Clear All
>>>Delete File UPTest.dbf
>>>Delete File UPTest.cdx
>>>
>>
>>Simon,
>>To me it's a bug on development side. It evalueates the string and seeks for a match. If string say has started with 2 then any letter then it'd locate the second whether 0 inserted or not.
>>Cetin