- Code: Select all Expand view RUN
#include "fivewin.ch"
request DBFcdx
FUNCTION MAIN()
SET DELETED On
DBCREATE( "TMPTEST", { { "TEST", "C", 10, 0 } } )
USE TMPTEST via "DBFcdx"
INDEX ON FIELD -> test TO TMPTEST
APPEND BLANK
REPLACE FIELD -> test WITH "Test 1"
APPEND BLANK
REPLACE FIELD -> test WITH "Test 2"
DELETE
APPEND BLANK
REPLACE FIELD -> test WITH "Test 2"
DELETE
APPEND BLANK
REPLACE FIELD -> test WITH "Test 3"
GO TOP
do while !eof()
? RECNO(), ORDKEYNO()
SKIP
enddo
CLOSE
RETURN NIL
The result is 1 1 and 4 2 which is the right one because why delete 2 records
Now try with ntx (remove REQUEST DBFcdx , remove via "DBFcdx")
The result is 1 1 and 4 4 which is the wrong . Using dbfntx the ordkeyno counts deleted records too.
Can someone please give me a clue how i can use dbfntx and ordkeyno to work ?
regards,
A.S.K