Skip Navigation LinksHome Page > Forums > SpiraTest Forums > SpiraTest Issues & Questi... > Can't delete a project
To give specific support on this issue, please contact Inflectra support. It looks like an attachment that has gotten cross-linked across a project. There is a SQL command that should fix it:
DELETE FROM TST_ARTIFACT_ATTACHMENT WHERE PROJECT_ID = X
(where X is the ID of the project in SpiraTest)
Error 1
APPLICATION.Business.DataAccess::ExecuteNonQuery:
The DELETE statement conflicted with the REFERENCE constraint "FK_TST_PROJECT_ATTACHMENT_TYPE_TST_PROJECT_ATTACHMENT". The conflict occurred in database "SpiraTeam", table "dbo.TST_PROJECT_ATTACHMENT", column 'PROJECT_ATTACHMENT_TYPE_ID'.
The statement has been terminated. [System.Data.SqlClient.SqlException]
Stack Trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at APPLICATION.Business.DataAccess.ExecuteNonQuery(String sqlCommand, Boolean useParam)
Error 2
APPLICATION.Business.Attachment::DeleteAllProjectAttachmentInfo: Database foreign key violation occurred [APPLICATION.Business.DataAccessForeignKeyException]
And if you have any questions, please email or call us at +1 (202) 558-6885