>>>first I select the table
>>>Then I do a seek
>>>it does'nt work
>>>
>>>I traced what's happening in the debugger. After the seek I looked to see where was the pointer in the table. Pointer was at the right place. So in debugger it works ok as long as I check for the the content of the table. Out of the debugger the pointer is not positioned at the right place after the seek.
>>>
>>>I replaced the seek by a locate and everything works fine.
>>>
>>>Why would I have this behavior with the seek?
>>
>>SET EXCACT?
>
>My apologies. Set exact was on
Then you must SEEK the exact expression of order key.
CREATE CURSOR Test (fld1 I, Fld2 C(10))
FOR asd = 1 TO 20
INSERT INTO Test VALUES (asd, [Test ]+TRANSFORM(asd))
NEXT
INDEX ON STR(Fld1)+Fld2 TAG TEST
SET EXACT ON
SEEK STR(10)
? [Exact ON Seeking just first part], FOUND()
SEEK STR(10)+[Test 10]
? [Exact ON Seeking whole key], FOUND()
SET EXACT OFF
SEEK STR(10)
? [Exact OFF Seeking only part], FOUND()
SEEK STR(10)+[Test 10]
? [Exact OFF Seeking whole key], FOUND()
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.