Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seek doesn't work and locate is ok
Message
De
20/06/2006 14:58:27
 
 
À
20/06/2006 14:23:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01130302
Message ID:
01130333
Vues:
24
>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform