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/16/2007 4:48 PM
 

Hi folks,

I've recently backed up my DNN 4.3.0 and the database from site and now I'm taking the files and doing a restore operation on a second server.

What I've done:

Unzipped DNN backup that was created with Grupolite in to the web root.

Restored database using restore filelistonly from disk ...

Restored files using restore database desd from disk ...

Set permissions for Network Services to full control for its web root

Created the appropriate user in the database for connectivity.

In web.config pointed the two database connectivity lines to localhost database server via 127.0.0.1 (later changed to the actual IP of the machine)

Changed the PortalAlias to the propper domain name.

Set debug to true (nothing extra seems to happen)

Set the database's collation to Latin1_General_CI_AS (Collation was originally set to SQL_...CI_AS or something similar)

I've looked in various logs but they aren't getting updated, I've set the system to audit the directories to see if there's a permission issue on them but there doesn't appear to be any. Checked the actual web logs, there doesn't appear to be any errors occuring in them.

What can I do to correct the error being received?

Thanks in advance.

The following error is occuring when I log in and load up the site:

DotNetNuke.Services.Exceptions.ModuleLoadException: Must declare the scalar variable "@ModuleID". ---> System.Data.SqlClient.SqlException: Must declare the scalar variable "@ModuleID". 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.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Modules.Announcements.SqlDataProvider.GetAnnouncements(Int32 ModuleId) at DotNetNuke.Modules.Announcements.AnnouncementsController.GetAnnouncements(Int32 ModuleId) at DotNetNuke.Modules.Announcements.Announcements.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

 
New Post
1/16/2007 7:31 PM
 
do you use a special objectQualifier or DatabaseOwner other than "dbo"?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
1/17/2007 5:03 AM
 

I have been getting same error when I tried to add/configure some module such as forum, events,etc.. Please help, I am stuck. I did same thing with the originator of the issue which was backed up the database in my local PC and restored on the hosting server and has some may issues like this 'error occured', 'module is unavailable', blah, blah

Thanks in advance.

 
New Post
1/17/2007 11:07 AM
 
Not knowing what a 'special objectQuantifier' is I would have to say no.

The database name is desd.
The owner is other than "dbo"
desd/Properties/Database/Owner=desd

Under desd/Security/Users/dbo/Properties/
 User name: dbo
 Login name: desd
 No owned Default schema
 Database role membership:
  db_owner is checked.
  No other items checked.

For the heck of it I went in to desd/Properties/Files/Owner and changed from desd to dbo so SQL Server Management reports the login 'dbo' does not exist. And it's right. But I stray. dbo is under the database's Users, as said above.
The error causes modules like Events, Links, and Documents to throw the error (but only if you're logged in, only displays Is not available when not). Just thought I would toss that in.
 
New Post
1/17/2007 1:49 PM
 
I am not sure, but this sounds like an issue with the special database owner. please check all object's owners and permissions.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
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