| |
|
|
|
|
|
|
|
|
|
 |    |  |
 | |  |
 | |  |
 | |  |
 | |  |
 |
|
|
| Error when installing a WAP module created from DotNetNuke Compiled Module VS template |
|
|
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 Rekryteringsföretag |
|
|
|
 |  |
|
|
| Re: Error when installing a WAP module created from DotNetNuke Compiled Module VS template |
|
|
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 |
|
|
|
 |  |
|
|
| Re: Error when installing a WAP module created from DotNetNuke Compiled Module VS template |
|
|
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
Rekryteringsföretag |
|
|
|
 |  |
|
|
| Re: Error when installing a WAP module created from DotNetNuke Compiled Module VS template |
|
|
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 |
|
|
|
|  |
 | |  |
 | |  |
 | |  |
|  |
| |
 |
|
These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.
For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.
|
| |
 |
|
|
|
|
|
|
|