When trying to delete a Queue in the Admin Console, you may experience an error message.
While running DebugView, you may see this error message for the event:
[2896] System.Data.SqlClient.SqlException: The DELETE
statement conflicted with the REFERENCE constraint
"FK_tblChatSegmentsTranslated_tblChatSegments". The conflict occurred
in database "SightMaxDB", table "dbo.tblChatSegmentsTranslated",
column 'SegmentID'.
[2896] The statement has been terminated.
[2896] at
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean
breakConnection)
[2896] at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,
Boolean breakConnection)
[2896] at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
[2896] at
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj)
[2896] at
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)
[2896] at
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
[2896] at
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
result)
[2896] at
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result,
String methodName, Boolean sendToPipe)
[2896] at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
[2896] at
System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo
queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[]
userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
[2896] at
System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[]
queryInfos, IObjectReaderFactory factory, Object[] userArguments,
ICompiledSubQuery[] subQueries)
[2896] at
System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression
query)
[2896] at
System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicDelete(TrackedObject
item)
[2896] at
System.Data.Linq.ChangeDirector.StandardChangeDirector.Delete(TrackedObject
item)
[2896] at
System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)
[2896] at
System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
[2896] at
System.Data.Linq.DataContext.SubmitChanges()
[2896] at
SmartMax.SightMax.Chat.Visitor.CallQueue.DeleteCallQueueCallback(Int32
accountDataBaseID, Int32 websiteDataBaseID, Int32 callQueueDataBaseID)
[2324]
System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The
DELETE statement conflicted with the REFERENCE constraint
"FK_tblChatSegmentsTranslated_tblChatSegments". The conflict occurred
in database "SightMaxDB", table
"dbo.tblChatSegmentsTranslated", column 'SegmentID'.
[2324] The statement has been terminated. (Fault Detail is
equal to An ExceptionDetail, likely created by
IncludeExceptionDetailInFaults=true, whose value is:
[2324] System.Data.SqlClient.SqlException: The DELETE
statement conflicted with the REFERENCE constraint
"FK_tblChatSegmentsTranslated_tblChatSegments". The conflict occurred
in database "SightMaxDB", table "dbo.tblChatSegmentsTranslated",
column 'SegmentID'.
[2324] The statement has been terminated.
[2324] at
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean
breakConnection)
[2324] at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,
Boolean breakConnection)
[2324] at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
[2324] at
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj)
[2324] at
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)
[2324] at
System.Data.S...).
[3044] Package 'Microsoft SQL Management Studio Package'
failed to load.
[3044] >> MSEnv extensibility
IClassFactory::LockServer(TRUE), lock count: 1
Solution: Connect to your SQL Server by using a SQL Management Studio, open the tblChatSegments, right click on any row and enter the Foreign Key Relationships, click on tblChatSegmentsTranslated > Expand INSERT and UPDATE specific > Select Delete Rule and set it to Cascade.