Hi, Joe.
When I replay a topic with the newset svn code, error occurs, as below:
/////////////////////////////////////////////////////////////////////////////////////////////////////
--------------------------------------------------------------------------------
Index was outside the bounds of the array.
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.IndexOutOfRangeException: Index was outside the bounds of the array.
Source Error:
Line 1197: arParams[1].Value = mostRecentPostUserId;
Line 1198:
Line 1199: arParams[2] = new SqliteParameter(":MostRecentPostDate", DbType.DateTime);
Line 1200: arParams[2].Direction = ParameterDirection.Input;
Line 1201: arParams[2].Value = mostRecentPostDate;
Source File: I:\company\mojoportal\mojoPortal.Data.SQLite\dbForums.cs Line: 1199
Stack Trace:
[IndexOutOfRangeException: Index was outside the bounds of the array.]
mojoPortal.Data.DBForums.ForumThreadIncrementReplyStats(Int32 threadId, Int32 mostRecentPostUserId, DateTime mostRecentPostDate) in I:\company\mojoportal\mojoPortal.Data.SQLite\dbForums.cs:1199
mojoPortal.Business.ForumThread.IncrementReplyStats() in I:\company\mojoportal\mojoPortal.Business\ForumThread.cs:432
mojoPortal.Business.ForumThread.Post() in I:\company\mojoportal\mojoPortal.Business\ForumThread.cs:489
mojoPortal.Web.ForumUI.ForumPostEdit.btnUpdate_Click(Object sender, EventArgs e) in I:\company\mojoportal\Web\ForumPostEdit.aspx.cs:282
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public static bool ForumThreadIncrementReplyStats(
int threadId,
int mostRecentPostUserId,
DateTime mostRecentPostDate)
{
......................
SqliteParameter[] arParams = new SqliteParameter[2];
.....................
}
after change
SqliteParameter[] arParams = new SqliteParameter[2];
to
SqliteParameter[] arParams = new SqliteParameter[3];
It's ok.
Thanks!