Reply in Forum with sqlitedb error.

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
5/17/2008 10:19:35 AM
Gravatar
Total Posts 59

Reply in Forum with sqlitedb error.

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!

 

 

5/17/2008 10:50:52 AM
Gravatar
Total Posts 18439

Re: Reply in Forum with sqlitedb error.

This is now fixed.

Thanks,

Joe

You must sign in to post in the forums. This thread is closed to new posts.