wakeboardtime
2010-04-07T19:24:39Z
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
Sponsor
LaurenceB
2010-04-07T19:29:36Z
what version of YAF??
wakeboardtime
2010-04-07T19:46:05Z
YetAnotherForum.NET version 1.9.4 RC2 (Date: 1/12/2010).

(must have taken the tip from SourceForge)

Everything else works great so I'd like to keep this if possible.
LaurenceB
2010-04-07T20:26:38Z
supposedly rc2 is kinda unstable I am using rc1 right now and have no problems with it so far in extensive single testing so I don't know if this is just a rc2 problem or a rc1 I am kinda leaning towards just rc2
wakeboardtime
2010-04-07T22:34:08Z
:cry: Oh, well. I'll have to try dropping down to RC1. I'll let you know what happens.
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2010-04-08T02:20:44Z
I use the latest svn with the patch applied:
http://forum.yetanotherf...versions-after-3259.aspx 
I don't have an error like this.

ani07in
2010-04-08T04:24:17Z
what is quote wrote:

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


ani07in
2010-04-08T04:27:28Z
testing what ius quote
LaurenceB wrote:

supposedly rc2 is kinda unstable I am using rc1 right now and have no problems with it so far in extensive single testing so I don't know if this is just a rc2 problem or a rc1 I am kinda leaning towards just rc2


About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved