An "Error executing SQL command [7050]." Error Occurs When Deleting Imported Documents that Do Not Contain Images.

November 12, 2007 | KB: 1011899
Laserfiche Server - United (MS SQL) 7

Summary

When you attempt to delete a document, you may receive the following error message:

    Error executing SQL command [7050].

Your repository's error.log file will contain entries similar to the following:

    [7050] Unable to delete a document (tocid=123456): Violation of PRIMARY KEY constraint 'PK_DeletedPage'. Cannot insert duplicate key in object 'DeletedPage'.

Cause

This issue can occur when you export a briefcase such that images are excluded from the export process. If you then import this briefcase and attempt to delete the imported documents, you may receive the above error message.

Workaround

Create a temporary volume. Migrate the affected documents to that temporary volume. Then try to delete the documents or detach the temporary volume.