Whilst deleting a portal, I recently received the following error message:
 |
Error: Edit Portals is currently unavailable. DotNetNuke.ModuleLoadException: DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_Skins_Tabs'. The conflict occurred in database 'dnn2', table 'Skins', column 'TabID'. The statement has been terminated. ---> System.Data.SqlClient.SqlException: DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_Skins_Tabs'. The conflict occurred in database 'dnn2', table 'Skins', column 'TabID'. The statement has been terminated. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Data.SqlDataProvider.DeletePortalInfo(Int32 PortalId) at DotNetNuke.SiteSettings.Delete_Click(Object sender, EventArgs e) --- End of inner exception stack trace --- |
To overcome this error and complete the deletion of your portal is a fairly straghtforward task. Most of our work will be using SQL commands in the Host SQL tab. Begin with the command
SELECT * FROM tabs WHERE portalid = 2 ORDER BY tabid
This will list those tabs (pages) assigned to your portal. You will need to set the value of portalid to match the one you wish to delete. Make a note of the tabids assigned to the portal.
We now need to see where the references to our tabids are in the table skins. To do this execute the command.
SELECT * FROM skins ORDER BY tabid
Compare the tabids from the previous sql command with this one. I found that those which caused my troubles had a value assigned to the tabid. Delete these and run your delete portal command again.
NAT October 2005
|
This article viewed: 1207 times |
Back |
Copyright © 2004-2007 Janet Systems Ltd.