cDBF = FILETOSTR("data_CL.dbf") nRecHead = CTOBIN(SUBSTR(cDBF,9,2),"RS2")+1 nRecSize = CTOBIN(SUBSTR(cDBF,11,2),"RS2") nRecCount = INT((LEN(SUBSTR(cDBF,nRecHead))-1)/nRecSize) cDBF = STUFF(cDBF,5,4,BINTOC(nRecCount,"RS4")) STRTOFILE(cDBF,"data_CL修复.dbf")