I have a table within a large database which is behaving very strangely. When I run a simple SQL (even when the table has no records), _TALLY returns the correct number of records selected by the query. However, when I check for the number of records in the cursor, it matches that of the number of records in the original table, although I know that the figure returned by _TALLY is correct. The funny bit is this. When I try and do CDX(1, 'cCursor'), it returns the .CDX of the DBF itself! I have removed the table from the database, re-created it and the problem occurs again.
If it is any help, I have done some fiddling and found that if the table has no CDX or IDX file (upon re-creating), it behaves perfectly OK. As soon as I add a CDX tag to the table, the error occurs again.
The database (and its memo file) was packed, validated and re-compiled after removeing the offending table. The table and its CDX were deleted from the disk.
Help anyone?
Sanjay Kapoor
Relatively speaking is a conversation with Einstein