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 ...DotNetNuke.Services.Exceptions.ModuleLoadException: Must declare the scalar variable "@ModuleID".  DotNetNuke.Services.Exceptions.ModuleLoadException: Must declare the scalar variable "@ModuleID".
Previous
 
Next
New Post
1/17/2007 2:28 PM
 

Okay, checked that and still nothing. From what I can tell.

Even opened up both databases and did a side by side comparison of permissions and such.

 
New Post
1/18/2007 5:45 PM
 

Actually I don't think it is a permission issue.

After doing google search for Must declare the scalar variable I found all sorts of things.

In the case of DNN, some developer is fat fingering the keyboard.

I downloaded 4.3.7 and installed per the instructions. And ran in to all sorts of scalar errors.

To correct the issue in the install of 4.3.7 I had to open a lot of files, do a lot of search and replace.

An example. In this example @PortalID is happy about itself. But if you go in and change the first @PortalID to @PortalId then SQL whines about scalar values. You will find numerous instances in other procedures where it's @name and @Name, or @modelID and @ModelID. Best thing to do is find out where it's complaining and then do a search and replace, that's what I ended up doing. Scalar errors would also prevent other things from happening. You might have seen functions missing and such. That's because the previous function might have had a scalar error and didn't get created.

CREATE PROCEDURE {databaseOwner}{objectQualifier}AddPropertyDefinition
 @PortalID int,
 @ModuleDefId int,
 @DataType int,
 @DefaultValue nvarchar(50),
 @PropertyCategory nvarchar(50),
 @PropertyName nvarchar(50),
 @Required bit,
 @ValidationExpression nvarchar(100),
 @ViewOrder int,
 @Visible bit,
    @Length int

AS
DECLARE @PropertyDefinitionId int

SELECT @PropertyDefinitionId = PropertyDefinitionId
 FROM   {objectQualifier}ProfilePropertyDefinition
 WHERE  (PortalId = @PortalID OR (PortalId IS NULL AND @PortalID IS NULL))
  AND PropertyName = @PropertyName

IF @PropertyDefinitionId is null
 BEGIN
  INSERT {objectQualifier}ProfilePropertyDefinition (
    PortalId,
    ModuleDefId,
    Deleted,
    DataType,
    DefaultValue,
    PropertyCategory,
    PropertyName,
    Required,
    ValidationExpression,
    ViewOrder,
    Visible,
    Length
   )
   VALUES (
    @PortalID,
    @ModuleDefId,
    0,
    @DataType,
    @DefaultValue,
    @PropertyCategory,
    @PropertyName,
    @Required,
    @ValidationExpression,
    @ViewOrder,
    @Visible,
    @Length
   )

  SELECT @PropertyDefinitionId = SCOPE_IDENTITY()
 END
ELSE
 BEGIN
  UPDATE {objectQualifier}ProfilePropertyDefinition
   SET DataType = @DataType,
    ModuleDefId = @ModuleDefId,
    DefaultValue = @DefaultValue,
    PropertyCategory = @PropertyCategory,
    Required = @Required,
    ValidationExpression = @ValidationExpression,
    ViewOrder = @ViewOrder,
    Deleted = 0,
    Visible = @Visible,
    Length = @Length
   WHERE PropertyDefinitionId = @PropertyDefinitionId
 END
 
SELECT @PropertyDefinitionId

GO

But back to my origianal error. I'm going to go in and find the bloody code that's causing the problem and fix the scalars and see if it goes away. In the mean time I'm going to file a bug report regarding the 4.3.7 files. Some of the developers must have their databases setup to ignore case and do the ol' axium - Do as I say, not as I do.

So stay tuned!

 
New Post
1/18/2007 8:18 PM
 
From the first sentence of your post I get, that you are using a case sensitive database, this is currently not supported by DotNetNuke.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
1/19/2007 11:17 AM
 

Sort of was using a case sensitive database.

When I installed MSSQL 2005 I inadvertently set the collation to Latin_BIN, dunno why. Guess that's what happens when you don't RTFM.

Regardless, I then restored the database from the previous site, its collation was set to SQL_Latin1_CI_AS, because I did see in another unsolved, or so I thought, post about something simlar to what I was experiencing. But since my restored DB was case insenstive I didn't think anything about it.

Who would have thunk that just because the in-use database is CI_AS that every database (The system ones) would also have to be CI_AS. Just darn weird.

Case solved!

Thgis happened because of wrong collation throughout the databases, and in part because who ever wrote the SQL statements didn't cling to some assemblance of uniformity. Ah, and there's already been a bug report on this but since DNN doesn't support case sensitive databases it's not a problem.

 
New Post
1/23/2007 5:43 PM
 

I have changed the collation of the DNN db to CI_AS, can't change the system dbs to CI_AS, hosting company operates on different language and collation. And still getting below error. Previously, it was @ModuleID, now it is @moduleid

case insensitive error :)

"A critical error has occurred.
Must declare the variable '@moduleid' "

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DotNetNuke.Services.Exceptions.ModuleLoadException: Must declare the scalar variable "@ModuleID".  DotNetNuke.Services.Exceptions.ModuleLoadException: Must declare the scalar variable "@ModuleID".


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