Upgrade from 1.5 to 1.6 - Getting SQL errors

Feb 3, 2010 at 11:51 PM

Hi, since upgrading to 1.6 I am getting this SQL error message every time I try to go to my site (the admin section seems to work just fine though). Any suggestions/help is greatly appreciated.

Raw Url : /default.aspx

Message : Exception of type 'System.Web.HttpUnhandledException' was thrown.

Source : System.Web

StackTrace : at System.Web.UI.Page.HandleError(Exception e)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest()

at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)

at System.Web.UI.Page.ProcessRequest(HttpContext context)

at ASP.default_aspx.ProcessRequest(HttpContext context)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

TargetSite : Boolean HandleError(System.Exception)

Message : Invalid column name 'ParentCommentID'.

Source : .Net SqlClient Data Provider

StackTrace : at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

at System.Data.SqlClient.SqlDataReader.get_MetaData()

at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)

at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.ExecuteReader()

at BlogEngine.Core.Providers.DbBlogProvider.SelectPost(Guid id) in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Providers\DbBlogProvider.cs:line 181

at BlogEngine.Core.Providers.BlogService.SelectPost(Guid id) in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Providers\BlogService.cs:line 86

at BlogEngine.Core.Post.DataSelect(Guid id) in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Post.cs:line 808

at BlogEngine.Core.BusinessBase`2.Load(KEY id) in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\BusinessBase.cs:line 271

at BlogEngine.Core.Providers.DbBlogProvider.FillPosts() in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Providers\DbBlogProvider.cs:line 526

at BlogEngine.Core.Post.get_Posts() in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Post.cs:line 431

at _default.Page_Load(Object sender, EventArgs e)

at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)

at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)

at System.Web.UI.Control.OnLoad(EventArgs e)

at BlogEngine.Core.Web.Controls.BlogBasePage.OnLoad(EventArgs e) in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Web\Controls\BlogBasePage.cs:line 56

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

TargetSite : Void OnError(System.Data.SqlClient.SqlException, Boolean)

Coordinator
Feb 4, 2010 at 4:40 AM
Edited Feb 4, 2010 at 4:43 AM

I'm guessing you're upgrading from 1.4.5 to 1.6 ?

In the setup\SQLServer folder, there's 2 upgrade scripts in there you will want to run.  These will add new columns and tables to your DB.

The two scripts to run are:

MSSQLUpgradeTo1.5.0.0From1.4.5.0.sql
MSSQLUpgradeFrom1.5To1.6.sql

EDIT:  I see the title of this thread is that you are upgrading from 1.5.  The error message you're getting says that the "ParentCommentID" column doesn't exist.  This column was added in 1.5.  Maybe you were at 1.4.5 originally, and upgraded to 1.5 without running the script at that time?  Just a guess.

Feb 4, 2010 at 7:51 AM

That was exactly the issue. I guess I hadn't upgraded that instance of BE but did the other ones. Thanks for the help!