Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional DotNetNuke 5: Open Source Web Application for ASP.NET ISBN: 978-0-470-43870-1
This is the forum to discuss the Wrox book Professional DotNetNuke 5: Open Source Web Application Framework for ASP.NET by Shaun Walker - Wrox DotNetNuke Series Editor, Brian Scarbeau, Darrell Hardy, Stan Schultes, Ryan Morgan; ISBN: 978-0-470-43870-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional DotNetNuke 5: Open Source Web Application for ASP.NET ISBN: 978-0-470-43870-1 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 19th, 2010, 02:10 AM
Registered User
 
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to taxivantha Send a message via Skype™ to taxivantha
Default Little error in the SqlDataProvider script of WROX.Suggestion

Needing to get a grasp quickly on module development, I've downloaded the source version of WROX.Suggestion.

Setting it up failed in the execution of the script for the creation of new tables. By executing the instructions in 02.00.00.SqlDFataProvider, I could narrow down the problem to 2 stored procedures: WROX_GetSuggestionModulesAllTabs and WROX_GetSuggestionModulesThisTab. closer inspection of the code for the creation of those 2 stored procedures revealed that the colomn ModuleTitle is looked up in the table dbo.Modules where in fact it is a column of the table dbo.TabModules.

Replacing 3 occurrences of 'm.ModuleTitle' with 'tm.ModuleTitle' resolves the error.
  #2 (permalink)  
Old December 19th, 2010, 06:16 AM
Registered User
 
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to taxivantha Send a message via Skype™ to taxivantha
Default

In the DotNetNuke forums, I learned from Sebastian Leupold that this is due to a modification, introduced in DNN 05.4

Anyone trying the instructions from your book on DNN 05.4+ will hit this problem. The work-around is easy.

After you unzip the files from the source code in your DesktopModules\WROX.Suggestion\ folder, edit the file 02.00.00.SqlDataProvider file in the wrox folder with a simple text editor.

The last two instructions in the file look like this:
CREATE PROCEDURE {databaseOwner}{objectQualifier}WROX_GetSuggestion ModulesAllTabs

as

declare @SuggestionModuleDefID int
set @SuggestionModuleDefID = (select ModuleDefID from {databaseOwner}{objectQualifier}ModuleDefinitions where FriendlyName='WROX.Suggestion')
select m.ModuleID,
'ModuleTitle' = m.ModuleTitle + ' (' + t.TabName + ')'
from {databaseOwner}{objectQualifier}Modules m inner join
{databaseOwner}{objectQualifier}TabModules tm on m.ModuleID = tm.ModuleID inner join
{databaseOwner}{objectQualifier}Tabs t on tm.TabID=t.TabID
where m.ModuleDefID = @SuggestionModuleDefID
and t.IsDeleted = 0
order by t.TabID, m.ModuleTitle

GO

and the next one:

CREATE PROCEDURE {databaseOwner}{objectQualifier}WROX_GetSuggestion ModulesThisTab

@TabID int

as

declare @SuggestionModuleDefID int
set @SuggestionModuleDefID = (select ModuleDefID from {databaseOwner}{objectQualifier}ModuleDefinitions where FriendlyName='WROX.Suggestion')
select m.ModuleID,
m.ModuleTitle
from {databaseOwner}{objectQualifier}Modules m Inner Join
{databaseOwner}{objectQualifier}TabModules tm on m.ModuleID = tm.ModuleID
where m.ModuleDefID = @SuggestionModuleDefID
and tm.TabID = @TabID
order by ModuleTitle

GO

This code is no longer compatible with DNN 05.4+ and should be replaced with the following code:

CREATE PROCEDURE {databaseOwner}{objectQualifier}WROX_GetSuggestion ModulesAllTabs

as

declare @SuggestionModuleDefID int
set @SuggestionModuleDefID = (select ModuleDefID from {databaseOwner}{objectQualifier}ModuleDefinitions where FriendlyName='WROX.Suggestion')
select m.ModuleID,
'ModuleTitle' = tm.ModuleTitle + ' (' + t.TabName + ')'
from {databaseOwner}{objectQualifier}Modules m inner join
{databaseOwner}{objectQualifier}TabModules tm on m.ModuleID = tm.ModuleID inner join
{databaseOwner}{objectQualifier}Tabs t on tm.TabID=t.TabID
where m.ModuleDefID = @SuggestionModuleDefID
and t.IsDeleted = 0
order by t.TabID, tm.ModuleTitle

GO


CREATE PROCEDURE {databaseOwner}{objectQualifier}WROX_GetSuggestion ModulesThisTab

@TabID int

as

declare @SuggestionModuleDefID int
set @SuggestionModuleDefID = (select ModuleDefID from {databaseOwner}{objectQualifier}ModuleDefinitions where FriendlyName='WROX.Suggestion')
select m.ModuleID,
tm.ModuleTitle
from {databaseOwner}{objectQualifier}Modules m Inner Join
{databaseOwner}{objectQualifier}TabModules tm on m.ModuleID = tm.ModuleID
where m.ModuleDefID = @SuggestionModuleDefID
and tm.TabID = @TabID
order by ModuleTitle

GO

Save the file and continue with the instructions. WROX.Suggestions will from there on work like the book says it should.
  #3 (permalink)  
Old February 21st, 2011, 07:38 AM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help

I replaced the code from the two stored procedures but this didn't fix the problem. I think I did something wrong here.
  #4 (permalink)  
Old February 21st, 2011, 07:10 PM
Registered User
 
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to taxivantha Send a message via Skype™ to taxivantha
Default

I got through it and make it work (actually, I made an module of my own, a page hit counter). If you tell me what error you have, I might help you out?
  #5 (permalink)  
Old February 23rd, 2011, 12:15 AM
Registered User
 
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to taxivantha Send a message via Skype™ to taxivantha
Default

I've reported on the issues I met going through the procedure from the book in the DNN forums. You can read them here: http://www.dotnetnuke.com/Resources/...s/Default.aspx

I hope this helps you figure it out.
  #6 (permalink)  
Old March 20th, 2011, 09:56 PM
Registered User
 
Join Date: Mar 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Change WROX_GetSuggestion ModulesAllTabs
to WROX_GetSuggestionModulesAllTabs
and
Change WROX_GetSuggestionModulesThisTab
to WROX_GetSuggestionModulesThisTab
in the above fix and it will work
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 12 and 13 Unable to find WROX.Suggestion module on website mfresa BOOK: Professional DotNetNuke 5: Open Source Web Application for ASP.NET ISBN: 978-0-470-43870-1 0 September 3rd, 2010 03:31 PM
GuestbookVB.SqlDataProvider shirk99 BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 0 February 19th, 2010 12:49 PM
Manually execute SqlDataProvider files... billg BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 2 July 6th, 2009 05:01 PM
Chapter 7 : Wrong SQLDataProvider methods claudiotereso BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 1 March 4th, 2009 10:13 AM
wrox php error mool Pro PHP 0 February 22nd, 2007 01:39 AM



All times are GMT -4. The time now is 12:43 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.