On Tue, 06 Oct 2009, Enrico Maria Giordano wrote: > The following sample prints 102 (in Clipper also): > FUNCTION MAIN() > SET DELETED ON > DBCREATE( "BUGTEST", { { "CODICE", "N", 3, 0 } } ) > USE BUGTEST > APPEND BLANK > REPLACE FIELD -> codice WITH 101 > DELETE > APPEND BLANK > REPLACE FIELD -> codice WITH 101 > APPEND BLANK > REPLACE FIELD -> codice WITH 102 > INDEX ON FIELD -> codice TO BUGTEST UNIQUE > GO TOP > WHILE !EOF() > ? FIELD -> codice > SKIP > ENDDO > CLOSE > INKEY( 0 ) > RETURN NIL > I wonder if it should print 101 and 102.
The behavior is correct. Index contain record 1 with value 101 but is filter by your SET DELETE ON filter. If you want to filter such records when index is created then use USEFILTER clause in INDEX ON command, i.e.: INDEX ON FIELD -> codice TO BUGTEST UNIQUE USEFILTER In such case record 1 (101) will not be added to filter but record 2 which has the same key. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour