Error after installing module.

Mar 13, 2009 at 8:12 PM
Hello Martin,

After i've downloaded the demo and uploaded it for installation to my portal, i received the following error and the module could not be used:

Info:: SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Foreign key 'FK_dnn_NetPDP_TimeSheetStatusTransitions_Permission' references invalid table 'dbo.Permission'. Could not create constraint. See previous errors. 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) /** NetPDP_TimeSheetStatusTransitions **/ if not exists (select * FROM dbo.sysobjects where id = object_id(N'dbo.[dnn_NetPDP_TimeSheetStatusTransitions]') and OBJECTPROPERTY(id, N'IsTable') = 1) BEGIN CREATE TABLE dbo.[dnn_NetPDP_TimeSheetStatusTransitions] ( [TimeSheetStatusTransitionId] [int] IDENTITY(1,1) NOT NULL, [TimeSheetStatusTransitionName] [nvarchar](50) NOT NULL, [TimeSheetStatusTransitionDescription] [ntext] NULL, [FromTimeSheetStatusId] [int] NOT NULL, [ToTimeSheetStatusId] [int] NOT NULL, [PermissionId] [int] NOT NULL, CONSTRAINT [PK_dnn_NetPDP_TimeSheetStatusTransitions] PRIMARY KEY CLUSTERED ( [TimeSheetStatusTransitionId] ASC ) WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] ALTER TABLE dbo.[dnn_NetPDP_TimeSheetStatusTransitions] WITH CHECK ADD CONSTRAINT [FK_dnn_NetPDP_TimeSheetStatusTransitions_dnn_NetPDP_TimeSheetStatus] FOREIGN KEY ([FromTimeSheetStatusId]) REFERENCES dbo.[dnn_NetPDP_TimeSheetStatus] ([TimeSheetStatusId]) ALTER TABLE dbo.[dnn_NetPDP_TimeSheetStatusTransitions] CHECK CONSTRAINT [FK_dnn_NetPDP_TimeSheetStatusTransitions_dnn_NetPDP_TimeSheetStatus] CREATE NONCLUSTERED INDEX [IX_dnn_NetPDP_TimeSheetStatusTransitions] ON dbo.[dnn_NetPDP_TimeSheetStatusTransitions] ([FromTimeSheetStatusId]) ALTER TABLE dbo.[dnn_NetPDP_TimeSheetStatusTransitions] WITH CHECK ADD CONSTRAINT [FK_dnn_NetPDP_TimeSheetStatusTransitions_dnn_NetPDP_TimeSheetStatus1] FOREIGN KEY ([ToTimeSheetStatusId]) REFERENCES dbo.[dnn_NetPDP_TimeSheetStatus] ([TimeSheetStatusId]) ALTER TABLE dbo.[dnn_NetPDP_TimeSheetStatusTransitions] CHECK CONSTRAINT [FK_dnn_NetPDP_TimeSheetStatusTransitions_dnn_NetPDP_TimeSheetStatus1] CREATE NONCLUSTERED INDEX [IX_dnn_NetPDP_TimeSheetStatusTransitions1] ON dbo.[dnn_NetPDP_TimeSheetStatusTransitions] ([ToTimeSheetStatusId]) ALTER TABLE dbo.[dnn_NetPDP_TimeSheetStatusTransitions] WITH CHECK ADD CONSTRAINT [FK_dnn_NetPDP_TimeSheetStatusTransitions_Permission] FOREIGN KEY ([PermissionId]) REFERENCES dbo.[Permission] ([PermissionID]) ALTER TABLE dbo.[dnn_NetPDP_TimeSheetStatusTransitions] CHECK CONSTRAINT [FK_dnn_NetPDP_TimeSheetStatusTransitions_Permission] CREATE NONCLUSTERED INDEX [IX_dnn_NetPDP_TimeSheetStatusTransitions2] ON dbo.[dnn_NetPDP_TimeSheetStatusTransitions] ([PermissionId]) END System.Data.SqlClient.SqlException: Foreign key 'FK_dnn_NetPDP_TimeSheets_Users' references invalid table 'dbo.Users'. Could not create constraint. See previous errors. 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) /** NetPDP_TimeSheets **/ if not exists (select * FROM dbo.sysobjects where id = object_id(N'dbo.[dnn_NetPDP_TimeSheets]') and OBJECTPROPERTY(id, N'IsTable') = 1) BEGIN CREATE TABLE dbo.[dnn_NetPDP_TimeSheets] ( [TimeSheetId] [int] IDENTITY(1,1) NOT NULL, [UserId] [int] NOT NULL, [PeriodStart] [datetime] NOT NULL, [PeriodEnd] [datetime] NOT NULL, [TimeSheetStatusId] [int] NOT NULL, CONSTRAINT [PK_dnn_NetPDP_TimeSheets] PRIMARY KEY CLUSTERED ( [TimeSheetId] ASC ) WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] ALTER TABLE dbo.[dnn_NetPDP_TimeSheets] WITH CHECK ADD CONSTRAINT [FK_dnn_NetPDP_TimeSheets_dnn_NetPDP_TimeSheetStatus] FOREIGN KEY ([TimeSheetStatusId]) REFERENCES dbo.[dnn_NetPDP_TimeSheetStatus] ([TimeSheetStatusId]) ALTER TABLE dbo.[dnn_NetPDP_TimeSheets] CHECK CONSTRAINT [FK_dnn_NetPDP_TimeSheets_dnn_NetPDP_TimeSheetStatus] CREATE NONCLUSTERED INDEX [IX_dnn_NetPDP_TimeSheets] ON dbo.[dnn_NetPDP_TimeSheets] ([TimeSheetStatusId]) ALTER TABLE dbo.[dnn_NetPDP_TimeSheets] WITH CHECK ADD CONSTRAINT [FK_dnn_NetPDP_TimeSheets_Users] FOREIGN KEY ([UserId]) REFERENCES dbo.[Users] ([UserID]) ALTER TABLE dbo.[dnn_NetPDP_TimeSheets] CHECK CONSTRAINT [FK_dnn_NetPDP_TimeSheets_Users] CREATE NONCLUSTERED INDEX [IX_dnn_NetPDP_TimeSheets1] ON dbo.[dnn_NetPDP_TimeSheets] ([UserId]) END
Info:: End Sql execution: 01.00.00.SqlDataProvider file

Perhaps you can tell me what i did wrong?
I'm using DNN vesion 04.09.02

Kind regards,
Mark Schouten