Create Table T1 (F1 C(10), F2 C(10), F3 C(10))
Insert Into T1 Values ('1','2','3')
Insert Into T1 Values ('1','B','D')
Insert Into T1 Values ('A','B','D')
Insert Into T1 Values ('A','B','3')
Close Databases
Clear
lcStr = Filetostr("T1.Dbf")
* 4 - 7 --> Number of records in file
* Calculate the number of records (bytes 5,6,7 and 8)
nRecords = Asc(Substr(lcStr, 5, 1)) + Asc(Substr(lcStr, 6, 1))*256 + ;
Asc(Substr(lcStr, 7, 1))*256^2 + Asc(Substr(lcStr, 8, 1))*256^3
? Iif(nRecords > 0, "有记录数 : " + Transform(nRecords) + ",不要删除。", "无记录数,可以删除!")