I use Harbour 3.1 and Windows 7 64 bits.
When I run this code, very often I got:
(DOS Error 32) DBFCDX/1006 Create error: C:\Users\John\Desktop\harbour
\DATA\CUSTOMER.cdx
Working sample at:
http://www.mediafire.com/?47nd41ki6l87jgx
Please, unzip and create a folder at your Desktop.
This is the code:
- Code: Select all Expand view RUN
#define CRLF Chr(13)+Chr(10)
STATIC pPath
//--------------------------------------------------------------
FUNCTION MAIN()
//--------------------------------------------------------------
LOCAL i := 0
pPath := hb_dirbase()+"DATA"
REQUEST DBFCDX, DBFFPT
RDDSETDEFAULT( "DBFCDX")
SET EPOCH TO 1990
SET CENTURY ON
SET DATE ITALIAN
SET DELETED ON
SetCancel( .F. )
SetHandleCount( 150 )
SELECT 1
USE (pPath+"\CUSTOMER") NEW
for i:= 1 to 100
reindex()
next
alert(str(i)+CRLF+CRLF+PPATH)
dbcloseall()
quit
RETURN NIL
//--------------------------------------------------------------
//--------------------------------------------------------------
FUNCTION REINDEX()
//--------------------------------------------------------------
SELECT ("CUSTOMER")
FERASE (pPath+"\CUSTOMER.CDX")
PACK
INDEX ON FIELD->LAST TO (pPath+"\CUSTOMER")
dbCommit()
return nil
//--------------------------------------------------------------
What´s wrong?. Any clue?.
Thank you very much.