Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very Bad Bug in VFP5.0 and VFP6.0 !!!
Message
De
29/12/1998 22:25:06
 
 
À
29/12/1998 22:15:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00171436
Message ID:
00171437
Vues:
38
>I hope this is a case of too much turkey over the holidays. I think i found a bug with Table Buffering. If i have a cursor with buffering set to 5(table) and change a value of an indexed field, then try to seek on the field i just changed, SEEK returns true (which it should not since the value no longer exists in the table) and the record pointer is left on the next record in the index order. I tested the following program in both VFP5.0a and VPF6.0 and got the same results. PLEASE somebody tell me i am crazy or i am doing something totally wrong.
>
>Thanks
>
>Geno Prida
>geno_prida@watsonwyatt.com
>
>
>** SAMPLE CODE **
>CLOSE DATA ALL
>
>CLEAR
>SET MULTILOCKS ON
>SET SAFETY OFF
>
>CREATE DATA IndexBug
>CREATE TABLE Tbl1 ( field1 i )
>INDEX ON field1 TAG field1
>
>FOR x = 1 to 9
> INSERT INTO Tbl1 VALUE(x)
>NEXT x
>
>CURSORSETPROP("Buffering", 5)
>
>lRetVal = SEEK(7, "Tbl1", "Field1")
>IF lRetVal THEN
> ? "Found 7 at recno ", RECNO()
>ENDIF
>
>? "Change value to 0..."
>REPLACE Field1 WITH 0
>
>lRetVal = SEEK(7, "Tbl1", "Field1")
>IF lRetVal THEN
> ? "Found 7 again! at recno ", RECNO()
>ELSE
> ?
> ? "It worked"
>ENDIF
>
>** END SAMPLE CODE **

I have never come against this problem so I am going to guess that seek is against the physical data not the buffered data.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform