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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN 4.3.7 removes DNN 4.3.7 removes '+' from my SQL scripts
Previous
 
Next
New Post
1/31/2007 12:13 PM
 

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

----------------------------------------------------------------

  

 
New Post
1/31/2007 2:16 PM
 
Try saving your .SqlDataProvider file in UTF-8 format.  I believe you can do this through the Save As dialog in notepad.
 
New Post
1/31/2007 2:36 PM
 

You need to be sure to properly encode your script files as UTF-8 and not ANSI, that's why you're losing your + signs in the SQL Scripts.


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
2/1/2007 4:02 AM
 

Of course!!! Thank you guys...

I just realise that I put forward a n00b question. I do remember something about making sure that your files are in UTF-8 format.

Well done... *slams head in the table*

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN 4.3.7 removes DNN 4.3.7 removes '+' from my SQL scripts


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