aDEFWEBSERVER
Los Angeles, CA *  Webmaster@ADefWebserver.com

Creating the DotNetNuke® Survey Module - Page 3 (Page 2)

Create The Content

Now that the files have been created, you will now insert the content for each file using the links below (click on .cs for the C# version of the file and .vb for the Visual Basic version of the file):

You can also download the files:

What Did We Just Do?

The code covers a lot of DotNetNuke module concepts. The explanation of the major concepts is covered in these posts:

 

Build the Site

From the menu bar, select Build then Build Web Site

The site should build without errors. If it has errors, download the code from the link above and compare the code to your code.

Create The Tables and Stored Procedures

The code is complete but the module will not work until you create the tables and stored procedures and set up the module configuration.

Open the DotNetNuke Site

From the menu bar in Visual Studio, select Debug, then Start Without Debugging

The site will come up

If you have problems at this point, ensure that you have correctly set up your development environment using one of these links:

Run the Database Scripts

You will now execute the three database scripts needed to create the tables and stored procedures the Module needs.

The reason there are three scripts is that each script is from a different version of the Module. When the module is installed, the DotNetNuke framework will run each SQL script in the Module package in order.

This is the mechanism that allows you to upgrade a module. For example, if the portal already has the Module version 03.01.00 installed it will not run that SQL script and will only run the SQL scripts with a higher number.

 
Click LOGIN
Log in as "host". The password (if you haven't already changed it) is also "dnnhost"
Click on the HOST menu and select SQL
Click on the link below and copy the entire SQL Script:

Paste the contents in the SQL box in your DotNetNuke website.

 
Select the Run as Script box and click "Execute".  
Watch the progress bar in your web browser because when the script has been run the text in the window will shift and then... nothing...

Next, select everything in the SQL box and delete it.

 
Paste the contents of the following scripts in the box, one at a time, in order:

Make sure that you Select the Run as Script box and click Execute each time and that you clear the contents of the SQL box each time.

If you make a mistake or receive an error, run the following script and re-run each script in order:

 
   
What Did We Just Do?

We ran a SQL script that created the tables and the stored procedures.

You will notice that the script is written like this:

CREATE TABLE {databaseOwner}{objectQualifier}Surveys 

rather than the normal:

CREATE TABLE [dbo][Surveys]

The script commands "{databaseOwner}" and "{objectQualifier}" indicate that they are to be replaced by configuration settings in the web.config file. Normally "{databaseOwner}" is set to ".dbo" and  "{objectQualifier}" is set to nothing (it would not have a setting). However, if alternate settings were indicated in the web.config file, those settings would be inserted into the script.

You must have the "Run as Script" box checked for this replacement to happen. 

Configure the Module

From the Host menu in your DotNetNuke website, select Module Definitions

From the Module Definitions menu, select Create New Module
The DNN_Survey.dnn file (created in the earlier step) will be detected. Select it from the drop-down and click the Install link.
The Survey Module definition will now show in the Module definitions list.
Click the Edit link next to the Survey Module definition.
The optional interfaces (Portable, Searchable, Upgradeable) will not be checked.

Click the Update Link

The Module Configuration will now be properly updated
Next, create a page to place the module on. On the Administrator control panel, click the Add link under the Page Functions section.
Enter details for the page, ensuring that All Users are selected under the View Page column. When you have entered the information, click the Update link.
Next, from the Administrator control panel, select Survey from the Module drop-down list and click the Add link.
The Survey Module will now appear.
   
   
The tutorial is now complete.
   

BACK
 

   

Michael Washington is a Website developer and an ASP.NET, C#, and Visual Basic programmer. He has extensive knowledge in process improvement, billing systems, and credit card transaction processing. He is a DotNetNuke Core member and has been involved with DotNetNuke for over 3 years. He is the author of numerous DotNetNuke modules and tutorials. He is one of the founding members of the Southern California DotNetNuke Users group (http://socaldug.org). He has a son, Zachary and resides in Los Angeles with his wife Valerie.

   
 

DotNetNuke MarketPlace

 

(C) by Michael Washington - ADefWebserver.com - Webmaster@ADefWebserver.com

DotNetNuke® is a registered trademark of Perpetual Motion Interactive Systems Inc.