Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this a bug in Seek()?
Message
From
26/03/2004 11:09:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00889986
Message ID:
00889992
Views:
27
>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")    && .F. as expected
>
>? Seek("mary","UPTest","Number")    && .F. as expected
>
>? Seek("0Mary","UPTest","Number")    && .F. as expected
>
>Insert Into UPTest (Number) VALUES (0)
>
>? Seek("Mary","UPTest","Number")    && .T.  ???
>
>? Seek("mary","UPTest","Number")    && .T.  ???
>
>? Seek("0Mary","UPTest","Number")    && .T.  ???
>
>
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform