Hi,
I am having trouble installing my custom modules in DNN 4.3.7
The problems are related to the SQL scripts that the module installer runs. It removes my string concatination characters ('+') from my stored procedures. Runing SQL profiler in the background have helped me discover this.
Running the same scripts in the SQL host module works like a charm.. but as soon as the module definition applications gets its hands on my script the plus characters are removed and generates errors.
Could this be a bug?
example script: (the red '+' characters magically dissapears)
------------------------------------------------
CREATE PROCEDURE [dbo].[spamct_AssetClassDelete]
(@AssetClassID int
,@RecordVersion timestamp)
AS
SET NOCOUNT ON
SET XACT_ABORT OFF -- Allow procedure to continue after error
DECLARE @ProcName varchar(30) -- Name of this procedure
DECLARE @Error integer -- Local variable to capture the error code.
DECLARE @RowCnt integer -- Number of rows returned
DECLARE @ErrMsg nvarchar(1000) -- Error message to return
DECLARE @Parameters nvarchar(1000) -- String representing parameters
SELECT @ProcName = object_name(@@procid)
, @Error = 0
, @RowCnt = 0
SET @Parameters = '' + ' AssetClassID: ' + COALESCE(CONVERT(VARCHAR, @AssetClassID), 'NULL')
DELETE FROM [dbo].[amct_AssetClass]
WHERE [AssetClassID] = @AssetClassID
AND [RecordVersion] = @RecordVersion
SELECT @Error = @@Error
, @RowCnt = @@RowCount
IF (@Error != 0)
BEGIN
SELECT @ErrMsg = 'Error deleting record. Parameters -' + @Parameters
GOTO ENDERROR
END
IF (@RowCnt = 0)
BEGIN
IF NOT EXISTS (SELECT 1
FROM [dbo].[amct_AssetClass]
WHERE [AssetClassID] = @AssetClassID)
BEGIN
SELECT @ErrMsg = 'Warning. Cannot find record. Parameters -' + @Parameters
GOTO ENDERROR
END
ELSE
BEGIN
SELECT @ErrMsg = 'Timestamp error'
GOTO ENDERROR
END
END
----------------------------------------------------------------