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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Error when installing a WAP module created from DotNetNuke Compiled Module VS templateError when installing a WAP module created from DotNetNuke Compiled Module VS template
Previous
 
Next
New Post
7/5/2008 1:12 AM
 

 

I have something wrong in the RNDViewInfo01.SqlDataProvider generated by the VS DotNetNuke Compiled Module template

 

The Error reported by DotNetNuke when trying to install my DotNetNuke Compiled  Module:

Start jobb Börjar exekvera Sql
Info Exekverar RNDViewInfo01.SqlDataProvider
Start jobb Start Sql exekvering: RNDViewInfo01.SqlDataProvider fil
Fel SQL exekvering resulterade i följande undantagsfel: System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_DesktopModules_ModuleName'. Cannot insert duplicate key in object 'dbo.DesktopModules'. Violation of UNIQUE KEY constraint 'IX_ModuleDefinitions'. Cannot insert duplicate key in object 'dbo.ModuleDefinitions'. Violation of UNIQUE KEY constraint 'IX_ModuleControls'. Cannot insert duplicate key in object 'dbo.ModuleControls'. Violation of UNIQUE KEY constraint 'IX_ModuleControls'. Cannot insert duplicate key in object 'dbo.ModuleControls'. Violation of UNIQUE KEY constraint 'IX_ModuleControls'. Cannot insert duplicate key in object 'dbo.ModuleControls'. The statement has been terminated. The statement has been terminated. The statement has been terminated. The statement has been terminated. The statement has been terminated. at System.Data.SqlClient.SqlConnection.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) /************************************************************/ /***** RegisterModule *****/ /***** *****/ /***** Use this script to register a module in the *****/ /***** database using Query Analyzer *****/ /***** *****/ /***** *****/ /***** Note: To manually execute this script you must *****/ /***** perform a search and replace operation *****/ /***** for dbo. and *****/ /***** *****/ /************************************************************/ exec dbo.[AddDesktopModule] @ModuleName = N'RNDViewInfo01', @FolderName = N'RNDViewInfo01', @FriendlyName = N'RNDViewInfo01', @Description = N'A RNDViewInfo01 module', @Version = N'01.00.00', @IsPremium = 0, @IsAdmin = 0, @BusinessController = N'ITansvar.Modules.RNDViewInfo01.RNDViewInfo01Controller', @SupportedFeatures = 3, @CompatibleVersions = NULL, @Dependencies = NULL, @Permissions = NULL declare @DesktopModuleId int select @DesktopModuleId = DesktopModuleId from dbo.[DesktopModules] where ModuleName = 'RNDViewInfo01' exec dbo.[AddModuleDefinition] @DesktopModuleId, @FriendlyName = N'RNDViewInfo01', @DefaultCacheTime = 0 declare @ModuleDefID int select @ModuleDefID = ModuleDefID from dbo.[ModuleDefinitions] where FriendlyName = 'RNDViewInfo01' exec dbo.[AddModuleControl] @ModuleDefID, @ControlKey = NULL, @ControlTitle = NULL, @ControlSrc = N'DesktopModules/RNDViewInfo01/ViewRNDViewInfo01.ascx', @IconFile = NULL, @ControlType = 0, @ViewOrder = NULL, @HelpUrl = NULL, @SupportsPartialRendering = 0 exec dbo.[AddModuleControl] @ModuleDefID, @ControlKey = 'Edit', @ControlTitle = 'Edit Content', @ControlSrc = N'DesktopModules/RNDViewInfo01/EditRNDViewInfo01.ascx', @IconFile = NULL, @ControlType = 1, @ViewOrder = NULL, @HelpUrl = NULL, @SupportsPartialRendering = 0 exec dbo.[AddModuleControl] @ModuleDefID, @ControlKey = 'Settings', @ControlTitle = 'RNDViewInfo01 Settings', @ControlSrc = N'DesktopModules/RNDViewInfo01/Settings.ascx', @IconFile = NULL, @ControlType = 1, @ViewOrder = NULL, @HelpUrl = NULL, @SupportsPartialRendering = 0
Slut jobb Klar Sql exekvering: RNDViewInfo01.SqlDataProvider fil
 
Slut jobb Klar Sql exekvering

 

The sourcefile RNDViewInfo01.SqlDataProvider

 

/************************************************************/
/*****              RegisterModule                      *****/
/*****                                                  *****/
/***** Use this script to register a module in the      *****/
/***** database using Query Analyzer                    *****/
/*****                                                  *****/
/*****                                                  *****/
/***** Note: To manually execute this script you must   *****/
/*****       perform a search and replace operation     *****/
/*****       for {databaseOwner} and {objectQualifier}  *****/
/*****                                                  *****/
/************************************************************/

exec {databaseOwner}[{objectQualifier}AddDesktopModule]
  @ModuleName = N'RNDViewInfo01',
  @FolderName = N'RNDViewInfo01',
  @FriendlyName = N'RNDViewInfo01',
  @Description = N'A RNDViewInfo01 module',
  @Version = N'01.00.00',
  @IsPremium = 0,
  @IsAdmin = 0,
  @BusinessController = N'ITansvar.Modules.RNDViewInfo01.RNDViewInfo01Controller',
  @SupportedFeatures = 3,
  @CompatibleVersions = NULL,
  @Dependencies = NULL,
  @Permissions = NULL


declare @DesktopModuleId int
select @DesktopModuleId = DesktopModuleId
from {databaseOwner}[{objectQualifier}DesktopModules]
where ModuleName = 'RNDViewInfo01'

exec {databaseOwner}[{objectQualifier}AddModuleDefinition] @DesktopModuleId,
  @FriendlyName = N'RNDViewInfo01',
  @DefaultCacheTime = 0

declare @ModuleDefID int
select @ModuleDefID = ModuleDefID
from {databaseOwner}[{objectQualifier}ModuleDefinitions]
where FriendlyName = 'RNDViewInfo01'

exec {databaseOwner}[{objectQualifier}AddModuleControl]
  @ModuleDefID,
  @ControlKey = NULL,
  @ControlTitle = NULL,
  @ControlSrc = N'DesktopModules/RNDViewInfo01/ViewRNDViewInfo01.ascx',
  @IconFile = NULL,
  @ControlType = 0,
  @ViewOrder = NULL,
  @HelpUrl = NULL,
  @SupportsPartialRendering = 0

exec {databaseOwner}[{objectQualifier}AddModuleControl]
  @ModuleDefID,
  @ControlKey = 'Edit',
  @ControlTitle = 'Edit Content',
  @ControlSrc = N'DesktopModules/RNDViewInfo01/EditRNDViewInfo01.ascx',
  @IconFile = NULL,
  @ControlType = 1,
  @ViewOrder = NULL,
  @HelpUrl = NULL,
  @SupportsPartialRendering = 0

exec {databaseOwner}[{objectQualifier}AddModuleControl]
  @ModuleDefID,
  @ControlKey = 'Settings',
  @ControlTitle = 'RNDViewInfo01 Settings',
  @ControlSrc = N'DesktopModules/RNDViewInfo01/Settings.ascx',
  @IconFile = NULL,
  @ControlType = 1,
  @ViewOrder = NULL,
  @HelpUrl = NULL,
  @SupportsPartialRendering = 0

 

/Johan    www.nätdejting.nu

 
New Post
7/5/2008 11:44 AM
 

i don't think your script is wrong, the issue is with the module itself, it appears that you're trying to install a module with a name that already exists, please check the dbo.DesktopModules and remove the relevent entry or else rename the module.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/7/2008 5:16 AM
 

Thanks Cathal for taking yoru time analyzing this script.

Then I think the issue is if I am doing the correct procedure when upgrading my modules. I do run the sam procedure when installing the first time as when I upgrade my modules. Either that is wrong and I should use a different upgrade procedure OR I am missing a script that is recognizing that there is a RNDViewInfo01.SqlDataProvider script and can jump over it when an upgrade is going on. Or should I exclude the script RNDViewInfo01.SqlDataProvider on an uppgrade PA package so that there is different packages on install and upgrades?

/Johan  www.nätdejting.nu     www.vattenskoter.info

 
New Post
7/8/2008 8:18 AM
 

Ah, I think I see your problem, your sqldataprovider script(s) should only contain the version, not the module name i.e.

01.00.00.SqlDataProvider

01.01.00.SqlDataProvider

etc.

the only files that will have a name similar to what you mentioned will be the compiled module itself (if using WAP or renamed from WSP) and it's data provider file, both of which are dll's and will look a little like this (actual names depend on namespace hierarchy)i.e.

RNDViewInfo01.dll

RNDViewInfo01.SqlDataProvider.dll


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Error when installing a WAP module created from DotNetNuke Compiled Module VS templateError when installing a WAP module created from DotNetNuke Compiled Module VS template


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