-2

How to read records that have been deleted. Can the record be read on excel or another software? If so, how?

2 Answers2

3

If they have been deleted but the table has not been PACKed, then issuing the RECALL ALL command will undelete them.

You can also issue SET DELETED OFF to make records marked for deletion available to SELECT-SQL commands and so forth.

If you're connecting to the data with the OLEDB driver, include 'DELETED=FALSE' in the connection string.

If the table has been PACKed then they are gone, restore a backup.

Alan B
  • 3,823
  • 19
  • 33
0

Lets start by talking about Excel...

The newer versions of Excel (2007 & 2010) cannot open Foxpro DBF files. Microsoft, in its infinite wisdom (??), decided to eliminate Excel's Read or Write capability of DBF files.

If, however you have an older version of Excel, then OK.

Should you happen to have Foxpro/Visual Foxpro and use it to 'export' DBF file contents into a CSV file, then Excel can open the CSV file (regardless of Excel version).

Now everything Alan B said above holds true. If the file is PACK'ed, the Deleted records are GONE!!

However if you have a backup, you can always do a comparison of the backup data table records and those in the current file to identify those records which were Deleted.

Again if you should happen to have a copy of Foxpro/Visual Foxpro and you have not PACK'ed the data table (DBF file), then you could always run a SQL Query of the table and pull the Deleted records into a separate memory cursor or data table and then do whatever you need to do with it.

Good Luck

Dhugalmac
  • 534
  • 7
  • 19