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 ENDFORThere are gaps in the PKs in my table. It correctly identified the gaps, and never failed for any other reason.
>>IF INDEXSEEK(value,.T., 'mytable','order') >> *-- do something >>ELSE >> *-- do something else >>ENDIF >>>>
> ? SEEK(value, 'mytable', 'order') && prints .f. > ? INDEXSEEK(value,.T., 'mytable','order') && prints .t. > ? SEEK(value, 'mytable', 'order') && prints .t. - second time it works >>
> ? INDEXSEEK(value,.T., 'mytable','order') && prints .t. > ? SEEK(value, 'mytable', 'order') && prints .t. >