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...Getting StartedGetting StartedProblem on package a module and install in a new site.Problem on package a module and install in a new site.
Previous
 
Next
New Post
7/20/2010 12:12 PM
 
Created a new module using DNN 4.9.3 community and sql express. Then created new table and some stored procedures by run in Host->SQL section run as script. All the stored procedure created successfully and worked fine. But while I am packaging the same and used in another website, on installing it is not creating those newly created stored procedures and table automatically.
This is because the 1.00.00.SqlDataProvider file not updated with newly stored procedure and table creation script.

So my question is shall I need to manually put those stored procedures scripts inside SqlDataProvider file or is there any process in DNN to automatically place the newly created table and stored procedure creation scripts?

Thanks
Sibabrata Dash
www.mindfiresolutions.com
 
New Post
8/21/2010 1:29 PM
 
Hi

I guess you've probably already worked out the answer to this one. I was looking for the same answer and found it on Michael Washingtons Survey module tutorial:

http://www.adefwebserver.com/dotnetnukehelp/DNN4_SurveyModule/

I was kind of hoping DNN would somehow build the SQL scripts automatically too!  alas..

Yes, you have to write the scripts yourself and paste them into text files.

Some good examples can be found on Michael Washingtons Survey module tutorial: The files are listed in this blog post.

http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryId/1164/New-Survey-Module-Tutorial-C-and-VB.aspx

It's important to note that the scripts must be incrememental. i.e. Each version you create of the module must create a new script (if it changes the db objects) that uses ALTER to change the objects. This can become a real headache when data is going into the tables and there are key constraints to deal with. Careful testing has to be carried out before upgrades are released.

You should also create an uninstall data provider file which deletes all the objects that the module creates. 

These data provider files are just text files but I think DNN converts them into some other format that it executes when the module is installed/uninstalled.

Gus

"if the only tool you have is a hammer you tend to see every problem as a nail" http://www.carawaydesign.com
 
New Post
8/21/2010 2:15 PM
 
You can use a  tool such as MS SQL Server Management Studo Express (free)  to emit table and stored procedure create scripts after you have designed your module's custom tables and stored procedures and tested them in the database. Since it is good development practice to properly include {databaseOwner} and {objectQualifier} tokens when referencing database objects in any script designed to be installed in DotNetNuke, you will then need to manually edit the scripts produced by SMS. Generally this is a simple find and replace operation. Don't forget when saving your scripts to save them with UTF-8 not ANSI encoding.

A few years ago I wrote a simple .Net Windows application program using the Microsoft Server Management Objects (SMO) API to automatically generate both the install and uninstall SqlDataProviders from a particular module's database objects (selecting objects related to the module by company name and module name prefix) and properly insert the {databaseOwner} and {objectQualifier} tokens. It works well for the initial version scripting but requires more manual work for update scripts. I should publish it as a CodePlex project sometime but would need to improve its interface a bit first.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
8/21/2010 6:33 PM
 
I just want to add that http://www.ssmstoolspack.com/ provide additional useful features for generating sql scripts.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedProblem on package a module and install in a new site.Problem on package a module and install in a new site.


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