Trying to manual install DNN on Windows Server 2012 and using MsSQL Express 2012, my DNN database collation is Latin1_General_CI_AS
During database installation process i'm getting this error:
18% ERROR occured - System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar variable "@portalid".
Incorrect syntax near the keyword 'ELSE'.
at System.Data.SqlClient.SqlConnection. (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, Boolean asyncWrite)
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:e3cdd147-7ca3-4734-b351-a4cd7d48406c
CREATE procedure dbo.GetTabPermissionsByPortal
@PortalID int
AS
IF @portalid is not null
BEGIN
SELECT *
FROM dbo.vw_TabPermissions
WHERE PortalID = @PortalID
END
ELSE
BEGIN
SELECT *
FROM dbo.vw_TabPermissions
WHERE PortalID IS NULL
END
System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar variable "@id".
at System.Data.SqlClient.SqlConnection. (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, Boolean asyncWrite)
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:e3cdd147-7ca3-4734-b351-a4cd7d48406c
CREATE PROCEDURE dbo.[Mobile_DeleteRedirection] @Id INT
AS
DELETE FROM dbo.Mobile_RedirectionRules
WHERE RedirectionId = @id
DELETE FROM dbo.Mobile_Redirections
WHERE Id = @Id
System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar variable "@id".
at System.Data.SqlClient.SqlConnection. (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, Boolean asyncWrite)
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:e3cdd147-7ca3-4734-b351-a4cd7d48406c
CREATE PROCEDURE dbo.[Mobile_DeleteRedirectionRule] @Id INT
AS
DELETE FROM dbo.Mobile_RedirectionRules
WHERE Id = @id
System.Data.SqlClient.SqlException (0x80131904): Must declare the scalar variable "@id".
Must declare the scalar variable "@id".
Must declare the scalar variable "@id".
at System.Data.SqlClient.SqlConnection. (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, Boolean asyncWrite)
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:e3cdd147-7ca3-4734-b351-a4cd7d48406c
CREATE PROCEDURE dbo.[AddSearchItemWord]
@SearchItemID INT,
@SearchWordsID INT,
@Occurrences INT
AS
DECLARE @ID INT
SELECT @id = SearchItemWordId
FROM dbo.SearchItemWord
WHERE SearchItemId = @SearchItemID
AND SearchWordsId = @SearchWordsID
IF @ID IS NULL
BEGIN
INSERT INTO dbo.SearchItemWord
([SearchItemId],
[SearchWordsId],
[Occurrences])
VALUES (@SearchItemID,
@SearchWordsID,
@Occurrences)
SELECT Scope_identity()
END
ELSE
BEGIN
UPDATE dbo.SearchItemWord
SET Occurrences = @Occurrences
WHERE SearchItemWordId = @id
AND Occurrences <> @Occurrences
SELECT @id
END
And goes on... Really tired of this. Since yesterday im trying to solve this problem. I wish someone can help me.
Thanks