Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Upgrade from 3.0.13 to 3.3.5 almost okUpgrade from 3.0.13 to 3.3.5 almost ok
Previous
 
Next
New Post
10/10/2006 4:27 AM
 

I just upgraded my site from 3.0.13 to 3.3.5 and it appeared to be fine (i.e. I can browse the site fine and I even changed some text in a few modules). Then I installed a skin - harmless. Then I tried to move a module or add a module and I get the following error and I have no idea why because the stored proc does exist and everything is set properly. Anybody experience this or have any ideas. TIA.

Michael

An error has occurred.
DotNetNuke.Services.Exceptions.ModuleLoadException: The stored procedure 'dbo.dnn_GetRole' doesn't exist. ---> System.InvalidOperationException: The stored procedure 'dbo.dnn_GetRole' doesn't exist. at System.Data.SqlClient.SqlCommand.DeriveParameters() at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Security.Membership.Data.SqlDataProvider.GetRole(Int32 RoleId, Int32 PortalId) at DotNetNuke.Security.Membership.DNNRoleProvider.GetRole(Int32 portalId, Int32 roleId) at DotNetNuke.UI.ControlPanels.ControlPanelBase.AddModulePermission(Int32 moduleId, PermissionInfo permission, Int32 roleId) at DotNetNuke.UI.ControlPanels.ControlPanelBase.AddNewModule(String title, Int32 desktopModuleId, String paneName, Int32 position, ViewPermissionType permissionType, String align) at DotNetNuke.UI.ControlPanels.IconBar.AddModule_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

 
New Post
10/11/2006 2:55 AM
 

Michael, can you validate that "dbo" does (in fact) own the sproc?  I wonder if its possible that you have a mix of owners/prefixes that is causing the problem (the "dnn_" leads me to believe you are using prefixes as well).

Cheers


Scott Willhite, Co-Founder DNN

"It is only with the heart that one can see rightly... what is essential is invisible to the eye. "
~ Antoine de Saint-Exupéry

 
New Post
10/11/2006 1:12 PM
 
Thanks for the reply. The dbo ownership and prefix stuff was OK. I did manage to discover and fix the real issues: During the upgrade from 3.0.13 to 3.3.5, several of the incremental version upgrade steps had failure messages related to the database. As it turned out, several of the tables didn’t have primary keys, one table was missing a column, etc. (WHY?!?) So, I went into each log and then repaired the tables and executed the necessary scripts that had failed during the upgrade process. This is absolutely crazy. I’ll chalk this one up to another miserable failed DNN upgrade, which continues my record of 100%.
 
New Post
10/12/2006 8:58 PM
 

Michael, if you would like to be of some assistance (which we do appreciate), you could document for me which items failed and in which scripts.  Your experience does not reflect that of everyone... and if we can do something to help avoid this experience, we will do our best.  We test extensively, but the number of variables involved are virtually limitless.  It would help to know what modules you had installed also.  If you are willing to provide a back of your 3.0.13 database, I'd be happy to keep it private for testing & validation purposes.

Kind Regards,
Scott Willhite


Scott Willhite, Co-Founder DNN

"It is only with the heart that one can see rightly... what is essential is invisible to the eye. "
~ Antoine de Saint-Exupéry

 
New Post
10/13/2006 2:48 AM
 

Hi Scott,

The 3.0.13 site was on GoDaddy's shared plan. So, I purchased/installed XPIdea's Backup/Restore module and backed up the site and db. No other modules. I installed a fresh copy of 3.0.13 on my new dedicated server, and then restored the site/db using the same product. Then I downloaded the 3.3.5 Upgrade package and performed the upgrade exactly as stated in the DNN installation manual. Following is the text from the upgrade log and following that are the actual error logs:

Upgrading DotNetNuke
Current Assembly Version: 03.03.05
Current Database Version: 03.00.13
00:00:00.046 - Executing Script: C:\Inetpub\CVSTI\Providers\DataProviders\SqlDataProvider\Upgrade.SqlDataProvider

Upgrade Status Report
00:00:00.296 - Upgrading to Version: 3.1.0 Error! (seeC:\Inetpub\CVSTI\Providers\DataProviders\SqlDataProvider\03.01.00.log for more information)
00:00:02.484 - Upgrading to Version: 3.1.1 Success
00:00:05.125 - Upgrading to Version: 3.2.0 Success
00:00:05.531 - Upgrading to Version: 3.2.1 Error! (seeC:\Inetpub\CVSTI\Providers\DataProviders\SqlDataProvider\03.02.01.log for more information)
00:00:05.781 - Upgrading to Version: 3.2.2 Success
00:00:05.781 - Upgrading to Version: 3.2.3 Error! (seeC:\Inetpub\CVSTI\Providers\DataProviders\SqlDataProvider\03.02.03.log for more information)
00:00:09.140 - Upgrading to Version: 3.2.4 Success
00:00:09.187 - Upgrading to Version: 3.2.5 Success
00:00:09.234 - Upgrading to Version: 3.2.6 Success
00:00:09.281 - Upgrading to Version: 3.2.7 Success
00:00:09.281 - Upgrading to Version: 3.3.0 Success
00:00:09.796 - Upgrading to Version: 3.3.1 Error! (seeC:\Inetpub\CVSTI\Providers\DataProviders\SqlDataProvider\03.03.01.log for more information)
00:00:09.890 - Upgrading to Version: 3.3.2 Success
00:00:10.046 - Upgrading to Version: 3.3.3 Error! (seeC:\Inetpub\CVSTI\Providers\DataProviders\SqlDataProvider\03.03.03.log for more information)
00:00:10.296 - Upgrading to Version: 3.3.4 Success
00:00:10.296 - Upgrading to Version: 3.3.5 Success
00:00:10.703 - Performing General Upgrades

Upgrade Complete

---

3.1.0 Error Log

System.Data.SqlClient.SqlException: 'IX_dnn_DesktopModules' is not a constraint.
Could not drop constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


ALTER TABLE dbo.dnn_DesktopModules
 DROP CONSTRAINT IX_dnn_DesktopModules

---

3.2.1 Error Log

System.Data.SqlClient.SqlException: 'FK_dnn_SearchItemWord_dnn_SearchWord' is not a constraint.
Could not drop constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


ALTER TABLE dbo.dnn_SearchItemWord
 DROP CONSTRAINT FK_dnn_SearchItemWord_dnn_SearchWord


System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.dnn_SearchWord' that match the referencing column list in the foreign key 'FK_dnn_SearchItemWord_dnn_SearchWord'.
Could not create constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


ALTER TABLE dbo.dnn_SearchItemWord WITH NOCHECK ADD CONSTRAINT
 FK_dnn_SearchItemWord_dnn_SearchWord FOREIGN KEY (SearchWordsID) REFERENCES dbo.dnn_SearchWord(SearchWordsID) ON UPDATE CASCADE ON DELETE CASCADE


System.Data.SqlClient.SqlException: 'FK_dnn_SearchItemWordPosition_dnn_SearchItemWord' is not a constraint.
Could not drop constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


ALTER TABLE dbo.dnn_SearchItemWordPosition
 DROP CONSTRAINT FK_dnn_SearchItemWordPosition_dnn_SearchItemWord


System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.dnn_SearchItemWord' that match the referencing column list in the foreign key 'FK_dnn_SearchItemWordPosition_dnn_SearchItemWord'.
Could not create constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


ALTER TABLE dbo.dnn_SearchItemWordPosition WITH NOCHECK ADD CONSTRAINT
 FK_dnn_SearchItemWordPosition_dnn_SearchItemWord FOREIGN KEY (SearchItemWordID) REFERENCES dbo.dnn_SearchItemWord (SearchItemWordID) ON UPDATE CASCADE ON DELETE CASCADE

---

3.2.3 Error Log

System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.dnn_Portals' that match the referencing column list in the foreign key 'FK_dnn_RoleGroups_dnn_Portals'.
Could not create constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)

/************************************************************/
/*****              SqlDataProvider                     *****/
/*****                                                  *****/
/*****                                                  *****/
/***** Note: To manually execute this script you must   *****/
/*****       perform a search and replace operation     *****/
/*****       for dbo. and dnn_  *****/
/*****                                                  *****/
/************************************************************/

/* Add RoleGroups Table */
/************************/

IF NOT EXISTS (select * from dbo.sysobjects where id = object_id(N'dbo.[dnn_RoleGroups]') and OBJECTPROPERTY(id, N'IsTable') = 1)
 BEGIN
  CREATE TABLE dbo.dnn_RoleGroups
  (
   [RoleGroupID] int IDENTITY(0,1) NOT NULL,
   [PortalID] int NOT NULL,
   [RoleGroupName] nvarchar(50) NOT NULL,
   [Description] nvarchar(1000) NULL
  )

  ALTER TABLE dbo.dnn_RoleGroups
   ADD CONSTRAINT [PK_dnn_RoleGroups] PRIMARY KEY NONCLUSTERED ([RoleGroupID])

  ALTER TABLE dbo.dnn_RoleGroups
   ADD CONSTRAINT [IX_dnn_RoleGroupName] UNIQUE NONCLUSTERED ([PortalID] ASC, [RoleGroupName] ASC)

  ALTER TABLE dbo.dnn_RoleGroups  WITH NOCHECK
   ADD CONSTRAINT [FK_dnn_RoleGroups_dnn_Portals] FOREIGN KEY([PortalID]) REFERENCES dbo.[dnn_Portals] ([PortalID]) ON DELETE CASCADE

  ALTER TABLE dbo.dnn_Roles
   ADD RoleGroupID int NULL

  ALTER TABLE dbo.dnn_Roles
   ADD CONSTRAINT FK_dnn_Roles_dnn_RoleGroups FOREIGN KEY (RoleGroupID) REFERENCES dbo.dnn_RoleGroups (RoleGroupID)
 END


System.Data.SqlClient.SqlException: Invalid column name 'RoleGroupId'.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


CREATE PROCEDURE dbo.[dnn_AddRole]

 @PortalId         int,
 @RoleGroupId      int,
 @RoleName         nvarchar(50),
 @Description      nvarchar(1000),
 @ServiceFee       money,
 @BillingPeriod    int,
 @BillingFrequency char(1),
 @TrialFee         money,
 @TrialPeriod      int,
 @TrialFrequency   char(1),
 @IsPublic         bit,
 @AutoAssignment   bit,
 @RSVPCode         nvarchar(50),
 @IconFile         nvarchar(100)

AS

INSERT INTO dbo.dnn_Roles (
  PortalId,
  RoleGroupId,
  RoleName,
  Description,
  ServiceFee,
  BillingPeriod,
  BillingFrequency,
  TrialFee,
  TrialPeriod,
  TrialFrequency,
  IsPublic,
  AutoAssignment,
  RSVPCode,
  IconFile
)
VALUES (
  @PortalId,
  @RoleGroupId,
  @RoleName,
  @Description,
  @ServiceFee,
  @BillingPeriod,
  @BillingFrequency,
  @TrialFee,
  @TrialPeriod,
  @TrialFrequency,
  @IsPublic,
  @AutoAssignment,
  @RSVPCode,
  @IconFile
)

SELECT SCOPE_IDENTITY()

 

System.Data.SqlClient.SqlException: Invalid column name 'RoleGroupId'.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


CREATE PROCEDURE dbo.[dnn_GetPortalRoles]

 @PortalId     int

AS

SELECT R.RoleId,
       R.PortalId,
       R.RoleGroupId,
       R.RoleName,
       R.Description,
       'ServiceFee' = case when convert(int,R.ServiceFee) <> 0 then R.ServiceFee else null end,
       'BillingPeriod' = case when convert(int,R.ServiceFee) <> 0 then R.BillingPeriod else null end,
       'BillingFrequency' = case when convert(int,R.ServiceFee) <> 0 then L1.Text else '' end,
       'TrialFee' = case when R.TrialFrequency <> 'N' then R.TrialFee else null end,
       'TrialPeriod' = case when R.TrialFrequency <> 'N' then R.TrialPeriod else null end,
       'TrialFrequency' = case when R.TrialFrequency <> 'N' then L2.Text else '' end,
       'IsPublic' = case when R.IsPublic = 1 then 'True' else 'False' end,
       'AutoAssignment' = case when R.AutoAssignment = 1 then 'True' else 'False' end,
       RSVPCode,
       IconFile
FROM dbo.dnn_Roles R
 LEFT OUTER JOIN dbo.dnn_Lists L1 on R.BillingFrequency = L1.Value
 LEFT OUTER JOIN dbo.dnn_Lists L2 on R.TrialFrequency = L2.Value
WHERE  PortalId = @PortalId
 OR     PortalId is null
ORDER BY R.RoleName

 

System.Data.SqlClient.SqlException: Invalid column name 'RoleGroupId'.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


CREATE PROCEDURE dbo.[dnn_GetRole]

 @RoleId   int,
 @PortalId int

AS

SELECT RoleId,
       PortalId,
       RoleGroupId,
       RoleName,
       Description,
       ServiceFee,
       BillingPeriod,
       BillingFrequency,
       TrialFee,
       TrialPeriod,
       TrialFrequency,
       IsPublic,
       AutoAssignment,
       RSVPCode,
       IconFile
FROM   dnn_Roles
WHERE  RoleId = @RoleId
 AND    PortalId = @PortalId

 

System.Data.SqlClient.SqlException: Invalid column name 'RoleGroupId'.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


CREATE PROCEDURE dbo.[dnn_GetRoleByName]

 @PortalId int,
 @RoleName nvarchar(50)

AS

SELECT RoleId,
       PortalId,
       RoleGroupId,
       RoleName,
       Description,
       ServiceFee,
       BillingPeriod,
       BillingFrequency,
       TrialFee,
       TrialPeriod,
       TrialFrequency,
       IsPublic,
       AutoAssignment,
       RSVPCode,
       IconFile
FROM   dnn_Roles
WHERE  PortalId = @PortalId
 AND RoleName = @RoleName

 

System.Data.SqlClient.SqlException: Invalid column name 'RoleGroupId'.
Invalid column name 'RoleGroupId'.
Invalid column name 'RoleGroupId'.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


CREATE PROCEDURE dbo.[dnn_GetRolesByGroup]

 @RoleGroupId     int,
 @PortalId   int

AS

SELECT R.RoleId,
       R.PortalId,
       R.RoleGroupId,
       R.RoleName,
       R.Description,
       'ServiceFee' = case when convert(int,R.ServiceFee) <> 0 then R.ServiceFee else null end,
       'BillingPeriod' = case when convert(int,R.ServiceFee) <> 0 then R.BillingPeriod else null end,
       'BillingFrequency' = case when convert(int,R.ServiceFee) <> 0 then L1.Text else '' end,
       'TrialFee' = case when R.TrialFrequency <> 'N' then R.TrialFee else null end,
       'TrialPeriod' = case when R.TrialFrequency <> 'N' then R.TrialPeriod else null end,
       'TrialFrequency' = case when R.TrialFrequency <> 'N' then L2.Text else '' end,
       'IsPublic' = case when R.IsPublic = 1 then 'True' else 'False' end,
       'AutoAssignment' = case when R.AutoAssignment = 1 then 'True' else 'False' end,
       R.RSVPCode,
       R.IconFile
FROM dbo.dnn_Roles R
 LEFT OUTER JOIN dbo.dnn_Lists L1 on R.BillingFrequency = L1.Value
 LEFT OUTER JOIN dbo.dnn_Lists L2 on R.TrialFrequency = L2.Value
WHERE  (RoleGroupId = @RoleGroupId OR (RoleGroupId IS NULL AND @RoleGroupId IS NULL))
 AND PortalId = @PortalId
ORDER BY R.RoleName

 

System.Data.SqlClient.SqlException: Invalid column name 'RoleGroupId'.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


CREATE PROCEDURE dbo.[dnn_UpdateRole]

 @RoleId           int,
 @RoleGroupId      int,
 @Description      nvarchar(1000),
 @ServiceFee       money,
 @BillingPeriod    int,
 @BillingFrequency char(1),
 @TrialFee         money,
 @TrialPeriod      int,
 @TrialFrequency   char(1),
 @IsPublic         bit,
 @AutoAssignment   bit,
 @RSVPCode         nvarchar(50),
 @IconFile         nvarchar(100)

AS

UPDATE dbo.dnn_Roles
SET    RoleGroupId = @RoleGroupId,
       Description = @Description,
       ServiceFee = @ServiceFee,
       BillingPeriod = @BillingPeriod,
       BillingFrequency = @BillingFrequency,
       TrialFee = @TrialFee,
       TrialPeriod = @TrialPeriod,
       TrialFrequency = @TrialFrequency,
       IsPublic = @IsPublic,
       AutoAssignment = @AutoAssignment,
       RSVPCode = @RSVPCode,
       IconFile = @IconFile
WHERE  RoleId = @RoleId

 

System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.dnn_Users' that match the referencing column list in the foreign key 'FK_dnn_UserProfile_dnn_Users'.
Could not create constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


/* Add UserProfile Table */
/*************************/

IF NOT EXISTS (select * from dbo.sysobjects where id = object_id(N'dbo.[dnn_UserProfile]') and OBJECTPROPERTY(id, N'IsTable') = 1)
 BEGIN
  CREATE TABLE dbo.dnn_UserProfile
  (
   [ProfileID] int IDENTITY(1,1) NOT NULL,
   [UserID] int NOT NULL,
   [PropertyDefinitionID] int NOT NULL,
   [PropertyValue] nvarchar(3750) NULL,
   [PropertyText] ntext NULL,
   [Visibility] int NOT NULL DEFAULT 0,
   [LastUpdatedDate] datetime NOT NULL
  )

  ALTER TABLE dbo.dnn_UserProfile
   ADD CONSTRAINT [PK_dnn_UserProfile] PRIMARY KEY NONCLUSTERED ([ProfileID])

  ALTER TABLE dbo.dnn_UserProfile  WITH NOCHECK
   ADD CONSTRAINT [FK_dnn_UserProfile_dnn_Users] FOREIGN KEY([UserID]) REFERENCES dbo.[dnn_Users] ([UserID]) ON DELETE CASCADE

  ALTER TABLE dbo.dnn_UserProfile  WITH NOCHECK
   ADD CONSTRAINT [FK_dnn_UserProfile_dnn_ProfilePropertyDefinition] FOREIGN KEY([PropertyDefinitionID]) REFERENCES dbo.[dnn_ProfilePropertyDefinition] ([PropertyDefinitionID]) ON DELETE CASCADE

 END


System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.dnn_Folders' that match the referencing column list in the foreign key 'FK_dnn_Files_dnn_Folders'.
Could not create constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


ALTER TABLE dbo.dnn_Files ADD CONSTRAINT
 FK_dnn_Files_dnn_Folders FOREIGN KEY
 (
 FolderID
 ) REFERENCES dbo.dnn_Folders
 (
 FolderID
 )

---

3.3.1 Error Log

System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.dnn_Folders' that match the referencing column list in the foreign key 'FK_dnn_Files_dnn_Folders'.
Could not create constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


/* This sets all cache root folders to protected */
/*************************************************/

UPDATE dnn_Folders
 SET     IsProtected = 1
WHERE
 FolderPath = 'Cache/'

/* This tries to apply a foreign key on the files/folders tables */
/*****************************************************************/

IF NOT EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'FK_dnn_Files_dnn_Folders') AND OBJECTPROPERTY(id, N'IsForeignKey') = 1)
 BEGIN
  ALTER TABLE dbo.dnn_Files ADD CONSTRAINT
   FK_dnn_Files_dnn_Folders FOREIGN KEY
   (
   FolderID
   ) REFERENCES dbo.dnn_Folders
   (
   FolderID
   )
 END

---

3.3.3 Error Log

System.Data.SqlClient.SqlException: There are no primary or candidate keys in the referenced table 'dbo.dnn_Portals' that match the referencing column list in the foreign key 'FK_dnn_ProfilePropertyDefinition_dnn_Portals'.
Could not create constraint. See previous errors.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)

 
IF NOT EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'FK_dnn_ProfilePropertyDefinition_dnn_Portals') AND OBJECTPROPERTY(id, N'IsForeignKey') = 1)
 ALTER TABLE dbo.dnn_ProfilePropertyDefinition
  ADD CONSTRAINT FK_dnn_ProfilePropertyDefinition_dnn_Portals FOREIGN KEY (PortalID) REFERENCES dbo.dnn_Portals (PortalID) ON DELETE CASCADE 

---

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Upgrade from 3.0.13 to 3.3.5 almost okUpgrade from 3.0.13 to 3.3.5 almost ok


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out