Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
SteadyRain
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Install It!  Getting module ID while the module is installing
Previous Previous
 
Next Next
New Post 4/1/2008 10:33 AM
User is offline mfredrick
2 posts
10th Ranked


Getting module ID while the module is installing 

 

I have a requirement to insert some master data into a table when the module is installed. The master data is supposed to have the module ID also. How do I get the module ID of the module (currently being installed) in the SQL scripts? Is there any token which can be used?

 
New Post 4/1/2008 4:36 PM
User is offline William Severance
811 posts
www.wesnetdesigns.com
7th Ranked






Re: Getting module ID while the module is installing 

The short answer is that you can't because a ModuleId is not assigned until an installed module is added to a page of the site. In some cases I have pre-populated tables with installation wide (not module specific) values signified by either a bit data  "Global" column or a -1 in the table's ModuleId column.

In most cases, however, module specific data should be added to table(s) when a module is accessed for the first time after being placed on a page. If the module makes use of one or more ModuleSettings, your code can recognize that it is being accessed for the first time if the module's Settings object is empty or you can define a specific Setting key/value to signifiy that the module's data has been previously initialized.

Another approach for "global" data is to key that to either the DesktopModuleId or ModuleDefinitionId as appropriate. These can be obtained in your implementation of the IUpgradable interface in your business controller class. The implementation's UpgradeModule method will be called once for each SQL dataprovider file version greater than the currently installed version which makes it the best place for version specific code to be run during installation.


Bill, WESNet Designs
 
New Post 4/5/2008 6:44 AM
User is offline mfredrick
2 posts
10th Ranked


Re: Getting module ID while the module is installing 

Thanks for your suggestions.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Install It!  Getting module ID while the module is installing
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Alliance Systems & Programming Inc
Alliance is not just our name... it's how we do business. We partner with our clients, learning their business processes and standards and then applying our expertise to help them improve their workflow and profitability.
www.Alliancesys.com
Customer Connect
Customer Connect provides cutting edge solutions that deliver sales, marketing and customer service results.
www.customer-connect.com
TechNexxus
Business process and technology sourcing solutions delivering superior people, process and value. We have used, and continue to use, DNN successfully in numerous client projects to deliver exceptional value. We are proud to support the DNN team and community.
www.technexxus.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP