Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SEEK function with a TagName
Message
De
24/03/2004 12:59:15
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
24/03/2004 12:39:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00889314
Message ID:
00889344
Vues:
31
Hi Chuck

Is this a multi-user situation? Perhaps the value hasn't been entered at the time of the seek. Perhaps another user changed the record before the seek executed. Perhaps the index needs to be rebuilt. As to it working only after the other seek, that makes sense, because if the value is in the index, both should work. It doesn't necessarily indicate that the other type of seeks are making the SEEK() function work.

I just ran this...
USE COMPANIES IN SELECT("COMPANIES")
SELECT 0
FOR I = 1 TO 1000000
  X = INT(RAND()*37656)+1
  IF SEEK(M.X,"COMPANIES","CMP_PK")
   ELSE
    ?M.X
    LOOP
  ENDIF
ENDFOR
There are gaps in the PKs in my table. It correctly identified the gaps, and never failed for any other reason.

>>This is ok or nok ?
>>
>>IF INDEXSEEK(value,.T., 'mytable','order')
>>   *-- do something
>>ELSE
>>   *-- do something else
>>ENDIF
>>
>>
>>FABIO
>
>
>Yes INDEXSEEK did work SEEK() didn't
>
>  ? SEEK(value, 'mytable', 'order') && prints .f.
>  ? INDEXSEEK(value,.T., 'mytable','order') && prints .t.
>  ? SEEK(value, 'mytable', 'order') && prints .t. - second time it works
>
>
>What's weird is that if I do the indexseek first then the seek function works also
>
>
>  ? INDEXSEEK(value,.T., 'mytable','order') && prints .t.
>  ? SEEK(value, 'mytable', 'order') && prints .t.
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform