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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DNN 4.0 Sql error message DNN 4.0 Sql error message
Previous
 
Next
New Post
3/29/2006 3:50 PM
 
In order to register a Module in DNN 4 some entries in the database need to be made.

I tried using the template provided modied it to this:

/************************************************************/
/*****              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 {dbo}[{ct_}AddDesktopModule]
  @ModuleName = N'CustomerTracking',
  @FolderName = N'CustomerTracking',
  @FriendlyName = N'CustomerTracking',
  @Description = N'A CustomerTracking module',
  @Version = N'01.00.00',
  @IsPremium = 0,
  @IsAdmin = 0,
  @BusinessController = N'Digerati.Modules.CustomerTracking.CustomerTrackingController',
  @SupportedFeatures = 3

declare @DesktopModuleId int
select @DesktopModuleId = DesktopModuleId
from {dbo}[{ct_}DesktopModules]
where ModuleName = 'CustomerTracking'

exec {dbo}[{ct_}AddModuleDefinition] @DesktopModuleId,
  @FriendlyName = N'CustomerTracking',
  @DefaultCacheTime = 0

declare @ModuleDefID int
select @ModuleDefID = ModuleDefID
from {dbo}[{ct_}ModuleDefinitions]
where FriendlyName = 'CustomerTracking'

exec {dbo}[{ct_}AddModuleControl]
  @ModuleDefID,
  @ControlKey = NULL,
  @ControlTitle = NULL,
  @ControlSrc = N'DesktopModules/CustomerTracking/ViewCustomerTracking.ascx',
  @IconFile = NULL,
  @ControlType = 0,
  @ViewOrder = NULL,
  @HelpUrl = NULL

exec {dbo}[{ct_}AddModuleControl]
  @ModuleDefID,
  @ControlKey = 'Edit',
  @ControlTitle = 'Edit Content',
  @ControlSrc = N'DesktopModules/CustomerTracking/EditCustomerTracking.ascx',
  @IconFile = NULL,
  @ControlType = 1,
  @ViewOrder = NULL,
  @HelpUrl = NULL

exec {dbo}[{ct_}AddModuleControl]
  @ModuleDefID,
  @ControlKey = 'Settings',
  @ControlTitle = 'CustomerTracking Settings',
  @ControlSrc = N'DesktopModules/CustomerTracking/Settings.ascx',
  @IconFile = NULL,
  @ControlType = 1,
  @ViewOrder = NULL,
  @HelpUrl = NULL




But got this error message:




System.Data.SqlClient.SqlException: Incorrect syntax near '{'. Incorrect syntax near '}'. Incorrect syntax near '}'. 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 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, CommandType commandType, String commandText) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) in C:\customerreporting\Library\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb:line 247 /************************************************************/ /***** 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}[{ct_}AddDesktopModule] @ModuleName = N'CustomerTracking', @FolderName = N'CustomerTracking', @FriendlyName = N'CustomerTracking', @Description = N'A CustomerTracking module', @Version = N'01.00.00', @IsPremium = 0, @IsAdmin = 0, @BusinessController = N'Digerati.Modules.CustomerTracking.CustomerTrackingController', @SupportedFeatures = 3 declare @DesktopModuleId int select @DesktopModuleId = DesktopModuleId from {dbo}[{ct_}DesktopModules] where ModuleName = 'CustomerTracking' exec {dbo}[{ct_}AddModuleDefinition] @DesktopModuleId, @FriendlyName = N'CustomerTracking', @DefaultCacheTime = 0 declare @ModuleDefID int select @ModuleDefID = ModuleDefID from {dbo}[{ct_}ModuleDefinitions] where FriendlyName = 'CustomerTracking' exec {dbo}[{ct_}AddModuleControl] @ModuleDefID, @ControlKey = NULL, @ControlTitle = NULL, @ControlSrc = N'DesktopModules/CustomerTracking/ViewCustomerTracking.ascx', @IconFile = NULL, @ControlType = 0, @ViewOrder = NULL, @HelpUrl = NULL exec {dbo}[{ct_}AddModuleControl] @ModuleDefID, @ControlKey = 'Edit', @ControlTitle = 'Edit Content', @ControlSrc = N'DesktopModules/CustomerTracking/EditCustomerTracking.ascx', @IconFile = NULL, @ControlType = 1, @ViewOrder = NULL, @HelpUrl = NULL exec {dbo}[{ct_}AddModuleControl] @ModuleDefID, @ControlKey = 'Settings', @ControlTitle = 'CustomerTracking Settings', @ControlSrc = N'DesktopModules/CustomerTracking/Settings.ascx', @IconFile = NULL, @ControlType = 1, @ViewOrder = NULL, @HelpUrl = NULL

 
New Post
4/5/2006 3:42 PM
 
I had this problem recently while trying to install the repository module and the WIKI module in the newest version 4.0.3.  Turned out, I had downloaded the source files and not the _Install.zip.  The _Install.zip installed just fine.  Of course, I could be off base estimating your problem too.
 
New Post
4/5/2006 3:51 PM
 
follow the steps in this post

http://forums.asp.net/thread/1114393.aspx
 
New Post
4/5/2006 8:51 PM
 

Although I have not looked through the particular script or fully understand why you are using this approach rather than packaging the module with a .dnn manifest file and letting the module installer do the work for you, the script errors stem from the use of the {} braces.  When you had replaced {databaseOwner} and {objectQualifier} the braces should have been removed as well.  For example

exec {dbo}[{ct_}AddDesktopModule]

should be

exec dbo.[ct_AddDesktopModule]

and so on - note particularly the period after dbo.

By the way, if you are running the script under the Host SQL tab, the replacement of {databaseOwner} and {objectQualifier} will be automatically done for you if you first check the "Execute as Script" checkbox before executing the script.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DNN 4.0 Sql error message DNN 4.0 Sql error message


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