Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seek() doesn't find record
Message
De
08/08/2001 11:12:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/08/2001 10:50:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00541290
Message ID:
00541305
Vues:
18
>In the command window, the SEEK() function finds a certain record. In the executable, it doesn't. I already checked, with the debugger:
>
>
  • That the same table is accessed.
    >
  • That the same index is used.
    >
  • That the seek expression is the same.
    >
  • That the table isn't filtered in either case.
    >
  • SET DELETED is ON in both cases.
    >
  • SET COLLATE is MACHINE in both cases.
    >
    >Are there any other methods to foul up the SEEK() function?
    >
    >TIA, Hilmar.

    OK, I finally found the problem, but it took me several hours of debugging. There are at least two other ways to foul up the SEEK: 1) SET NEAR (this wasn't my problem), and actual changes to the data (this was my problem).

    It turns out that in the program, I deleted several records, and issued TableUpdate() - but I carelessly forgot to issue TableRevert() when the TableUpdate() failed. (The idea was to delete records that didn't have child records in another table.)

    Since I was seeking in the same alias, the records were temporarily invisible. When cancelling the program, apparently the records were reverted automatically, and were visible again!

    Hilmar.
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Précédent
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform