Hi all,
I get this error when trying to select "Watch this topic and receive notification via e-mail." Any clues?
Server Error in '/' Application.
--------------------------------------------------------------------------------
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_WatchTopic_yaf_Topic". The conflict occurred in database "yaf", table "dbo.yaf_Topic", column 'TopicID'.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_WatchTopic_yaf_Topic". The conflict occurred in database "yaf", table "dbo.yaf_Topic", column 'TopicID'.
The statement has been terminated.
Source Error:
Line 784: {
Line 785: // subscribe to this forum
Line 786: DB.watchtopic_add(userId, topicId);
Line 787: }
Line 788: }
Source File: c:\Inetpub\vhosts\test.wakeboardtime.com\httpdocs\pages\postmessage.ascx.cs Line: 786
Stack Trace:
[SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_WatchTopic_yaf_Topic". The conflict occurred in database "yaf", table "dbo.yaf_Topic", column 'TopicID'.
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1948826
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844747
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
YAF.Classes.Data.YafDBAccess.ExecuteNonQuery(SqlCommand cmd, Boolean transaction) in C:\projects\wbt\trunk\yafsrc\YAF.Classes\YAF.Classes.Data\YafDBAccess.cs:403
YAF.Classes.Data.DB.watchtopic_add(Object userID, Object topicID) in C:\projects\wbt\trunk\yafsrc\YAF.Classes\YAF.Classes.Data\DB.cs:8385
YAF.Pages.postmessage.WatchTopic(Int32 userId, Int32 topicId) in c:\Inetpub\vhosts\test.wakeboardtime.com\httpdocs\pages\postmessage.ascx.cs:786
YAF.Pages.postmessage.UpdateWatchTopic(Int32 userId, Int32 topicId) in c:\Inetpub\vhosts\test.wakeboardtime.com\httpdocs\pages\postmessage.ascx.cs:773
YAF.Pages.postmessage.PostReplyHandleNewPost() in c:\Inetpub\vhosts\test.wakeboardtime.com\httpdocs\pages\postmessage.ascx.cs:708
YAF.Pages.postmessage.PostReply_Click(Object sender, EventArgs e) in c:\Inetpub\vhosts\test.wakeboardtime.com\httpdocs\pages\postmessage.ascx.cs:560
YAF.Controls.ThemeButton.OnClick(EventArgs e) in C:\projects\wbt\trunk\yafsrc\YAF.Controls\ThemeButton.cs:415
YAF.Controls.ThemeButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) in C:\projects\wbt\trunk\yafsrc\YAF.Controls\ThemeButton.cs:273
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
what is quote wrote: