Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PACK table error 1

Status
Not open for further replies.

ezpzjohn

Programmer
Jun 29, 2001
50
GB
Over the last few weeks I have started receiving reports of errors from users of our software.

I normally write code that follows the deletion of a record from a table with a PACK command to permanently remove the deleted record. Some users are now reporting that following deletion of a record they get an error, from the program code that follows the PACK command and re-fetches the updated table, saying that the table does not exist.

On reading the VFP help file I understand that a pack is carried out by first copying all the records in the table that are not marked for deletion to a new, temporary table. The original table is then deleted and the temporary table renamed with the original table name. It seems to me that the second step is failing and the temporary table is not being renamed or the table link to the database is not being recreated.

Has anyone else encountered this problem?

Could this be as a result of interference from anti-virus software as regards the file renaming?

John B
 
The advantage of using a surrogate primary key is that when the user needs to change the key value they enter, as inevitably happens, no matter how much they tell you it won't, you only need to change it in the one place it's stored, instead of cascading changes to other tables.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top