Delete Post MSSQL Provider

Jan 25, 2008 at 10:53 PM
Edited Jan 25, 2008 at 11:20 PM
Test of lastest build of site I found that the Delete post link not working below is the error. Any help would be great.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 20: Post post = BlogEngine.Core.Post.GetById(guid);
Line 21: post.Delete();
Line 22: post.Save();
Line 23: }
Line 24:

Source File: d:\hosting\breanna13\blog\post.aspx.cs Line: 22

Stack Trace:

NullReferenceException: Object reference not set to an instance of an object.
BlogEngine.Core.Provider.MSSQL.SQLManagedConnection.AddInParameter(String name, DbType dbType, Object value) in SQLManagedConnection.cs:231
BlogEngine.Core.Provider.MSSQL.CIPosts.Delete(Post post) in CIPosts.cs:324
BlogEngine.Core.Post.DataDelete() in Post.cs:183
BlogEngine.Core.BusinessBase`2.Update() in BusinessBase.cs:318
BlogEngine.Core.BusinessBase`2.Save() in BusinessBase.cs:299
post.Delete(Guid guid) in d:\hosting\breanna13\blog\post.aspx.cs:22
post.OnPreInit(EventArgs e) in d:\hosting\breanna13\blog\post.aspx.cs:40
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +521