Sanjeet
asked on
DNN 4.0 Sql error message
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_}AddDesktopModul e]
@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.Custome rTracking. CustomerTr ackingCont roller',
@SupportedFeatures = 3
declare @DesktopModuleId int
select @DesktopModuleId = DesktopModuleId
from {dbo}[{ct_}DesktopModules]
where ModuleName = 'CustomerTracking'
exec {dbo}[{ct_}AddModuleDefini tion] @DesktopModuleId,
@FriendlyName = N'CustomerTracking',
@DefaultCacheTime = 0
declare @ModuleDefID int
select @ModuleDefID = ModuleDefID
from {dbo}[{ct_}ModuleDefinitio ns]
where FriendlyName = 'CustomerTracking'
exec {dbo}[{ct_}AddModuleContro l]
@ModuleDefID,
@ControlKey = NULL,
@ControlTitle = NULL,
@ControlSrc = N'DesktopModules/CustomerT racking/Vi ewCustomer Tracking.a scx',
@IconFile = NULL,
@ControlType = 0,
@ViewOrder = NULL,
@HelpUrl = NULL
exec {dbo}[{ct_}AddModuleContro l]
@ModuleDefID,
@ControlKey = 'Edit',
@ControlTitle = 'Edit Content',
@ControlSrc = N'DesktopModules/CustomerT racking/Ed itCustomer Tracking.a scx',
@IconFile = NULL,
@ControlType = 1,
@ViewOrder = NULL,
@HelpUrl = NULL
exec {dbo}[{ct_}AddModuleContro l]
@ModuleDefID,
@ControlKey = 'Settings',
@ControlTitle = 'CustomerTracking Settings',
@ControlSrc = N'DesktopModules/CustomerT racking/Se ttings.asc x',
@IconFile = NULL,
@ControlType = 1,
@ViewOrder = NULL,
@HelpUrl = NULL
But got this error message:
System.Data.SqlClient.SqlE xception: Incorrect syntax near '{'. Incorrect syntax near '}'. Incorrect syntax near '}'. at System.Data.SqlClient.SqlC onnection. OnError(Sq lException exception, Boolean breakConnection) at System.Data.SqlClient.SqlI nternalCon nection.On Error(SqlE xception exception, Boolean breakConnection) at System.Data.SqlClient.TdsP arser.Thro wException AndWarning (TdsParser StateObjec t stateObj) at System.Data.SqlClient.TdsP arser.Run( RunBehavio r runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlC ommand.Run ExecuteNon QueryTds(S tring methodName, Boolean async) at System.Data.SqlClient.SqlC ommand.Int ernalExecu teNonQuery (DbAsyncRe sult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlC ommand.Exe cuteNonQue ry() at Microsoft.ApplicationBlock s.Data.Sql Helper.Exe cuteNonQue ry(SqlConn ection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlock s.Data.Sql Helper.Exe cuteNonQue ry(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlock s.Data.Sql Helper.Exe cuteNonQue ry(String connectionString, CommandType commandType, String commandText) at DotNetNuke.Data.SqlDataPro vider.Exec uteScript( String Script, Boolean UseTransactions) in C:\customerreporting\Libra ry\Provide rs\DataPro viders\Sql DataProvid er\SqlData Provider.v b: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_}AddDesktopModul e] @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.Custome rTracking. CustomerTr ackingCont roller', @SupportedFeatures = 3 declare @DesktopModuleId int select @DesktopModuleId = DesktopModuleId from {dbo}[{ct_}DesktopModules] where ModuleName = 'CustomerTracking' exec {dbo}[{ct_}AddModuleDefini tion] @DesktopModuleId, @FriendlyName = N'CustomerTracking', @DefaultCacheTime = 0 declare @ModuleDefID int select @ModuleDefID = ModuleDefID from {dbo}[{ct_}ModuleDefinitio ns] where FriendlyName = 'CustomerTracking' exec {dbo}[{ct_}AddModuleContro l] @ModuleDefID, @ControlKey = NULL, @ControlTitle = NULL, @ControlSrc = N'DesktopModules/CustomerT racking/Vi ewCustomer Tracking.a scx', @IconFile = NULL, @ControlType = 0, @ViewOrder = NULL, @HelpUrl = NULL exec {dbo}[{ct_}AddModuleContro l] @ModuleDefID, @ControlKey = 'Edit', @ControlTitle = 'Edit Content', @ControlSrc = N'DesktopModules/CustomerT racking/Ed itCustomer Tracking.a scx', @IconFile = NULL, @ControlType = 1, @ViewOrder = NULL, @HelpUrl = NULL exec {dbo}[{ct_}AddModuleContro l] @ModuleDefID, @ControlKey = 'Settings', @ControlTitle = 'CustomerTracking Settings', @ControlSrc = N'DesktopModules/CustomerT racking/Se ttings.asc x', @IconFile = NULL, @ControlType = 1, @ViewOrder = NULL, @HelpUrl = NULL
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_}AddDesktopModul
@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.Custome
@SupportedFeatures = 3
declare @DesktopModuleId int
select @DesktopModuleId = DesktopModuleId
from {dbo}[{ct_}DesktopModules]
where ModuleName = 'CustomerTracking'
exec {dbo}[{ct_}AddModuleDefini
@FriendlyName = N'CustomerTracking',
@DefaultCacheTime = 0
declare @ModuleDefID int
select @ModuleDefID = ModuleDefID
from {dbo}[{ct_}ModuleDefinitio
where FriendlyName = 'CustomerTracking'
exec {dbo}[{ct_}AddModuleContro
@ModuleDefID,
@ControlKey = NULL,
@ControlTitle = NULL,
@ControlSrc = N'DesktopModules/CustomerT
@IconFile = NULL,
@ControlType = 0,
@ViewOrder = NULL,
@HelpUrl = NULL
exec {dbo}[{ct_}AddModuleContro
@ModuleDefID,
@ControlKey = 'Edit',
@ControlTitle = 'Edit Content',
@ControlSrc = N'DesktopModules/CustomerT
@IconFile = NULL,
@ControlType = 1,
@ViewOrder = NULL,
@HelpUrl = NULL
exec {dbo}[{ct_}AddModuleContro
@ModuleDefID,
@ControlKey = 'Settings',
@ControlTitle = 'CustomerTracking Settings',
@ControlSrc = N'DesktopModules/CustomerT
@IconFile = NULL,
@ControlType = 1,
@ViewOrder = NULL,
@HelpUrl = NULL
But got this error message:
System.Data.SqlClient.SqlE
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER