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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...why using ModuleID in insert/update/delete/select operations in dotnetnukewhy using ModuleID in insert/update/delete/select operations in dotnetnuke
Previous
 
Next
New Post
8/9/2009 1:22 PM
 

hello all,

just want to ask why we use/pass moduleID in insert/update/delete and select operations in provider class and from there to stored procedure. I have a working module without passing the moduleID to any of above operations. So, wondering because all the online examples i saw; they are passing ModuleID for each and every database operations and also storing ModuleID as a field in each table as well. TIA

 
New Post
8/9/2009 3:40 PM
 

the ModuleID is used to identify which data goes with with module 'instance'.  When you place a module on a page, it is assigned a unique 'ModuleID'.  Now, let's take the documents module as an example.  You place 1 instance of a documents module on page 1.  Let's say it is assigned a ModuleID of 1.  Now, put a documents module on page 2.  It would be assigned a ModuleID of 2.  Now, both of those modules store there data in the same database table, Documents, so without using the ModuleID, how would you know which documents should be shown on page 1 and which documents should be shown on page 2.

Now, if you only ever expect to have 1 instance of your module on a web site, then you wouldn't need to use ModuleID, OR if you wanted EVERY instance of your module to show exactly the same data, then you wouldn't need to use the ModuleID, but in most cases the use of ModuleID is absolutely critical.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...why using ModuleID in insert/update/delete/select operations in dotnetnukewhy using ModuleID in insert/update/delete/select operations in dotnetnuke


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