Hi Everyone.
When I try to upgrade one of my sites from 7.0.3 to 7.1.2 (basically to any version higher than 7.0.3) I am getting the following exception:
--------------------------------------------------------------------------------------------------------------------------------------------
System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "dbo.Journal" because it does not exist or you do not have permissions.
at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:a2128cf5-9eea-4139-bf7f-69014068ac36
/*****Journal Updates *****/
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME='Journal' AND COLUMN_NAME='CommentsDisabled')
BEGIN
ALTER TABLE dbo.Journal
ADD CommentsDisabled bit NOT NULL CONSTRAINT DF_Journal_CommentsDisabled DEFAULT 0
END
System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "dbo.Journal" because it does not exist or you do not have permissions.
at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:6ee462e7-dfca-48c5-b56d-30fed98be3cf
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME='Journal' AND COLUMN_NAME='CommentsHidden')
BEGIN
ALTER TABLE dbo.Journal
ADD CommentsHidden bit NOT NULL CONSTRAINT DF_Journal_CommentsHidden DEFAULT 0
END
--------------------------------------------------------------------------------------------------------------------------------------------
The site is running on SQL 2008 R2. I checked the database and it does not have that table. Should it be in there? I tried to create the Journal table by code but ran into the next error that says something like "invalid field IsDeleted" so I reverted back.
The upgrade went through to the end and the site seems to be fully functional so I am wondering why that error came up.
Any help is appreciated.
Cheers
Nils