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  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Configure It! (...  Problem using DataProviders
Previous Previous
 
Next Next
New Post 10/1/2008 8:14 AM
User is offline som4
78 posts
10th Ranked


Problem using DataProviders 

Hi all,

I've produced a few Modules for DNN now but when i attempted to use the database using the dataproviders i hit a problem.

What i wanted to do is take the defualt DNN module template (the one whith the simple datalist you can add stuff too) and turn it into an editable product advert.  So i now want it to load an image some text and a price instead of just text.  I went through and updated the sqlDataProvider, the DataProvider, the module controller, module info class, and the stored procedures.

I now have a module that lets you edit it by clicking on the pencil icon next to each item in the list.  You can then enter some 'text' and a url.  The 'text' is what was created by the dnn template. I can get the module to update the text and the url but i can't get it to load both from the datbase.  Text appears fine but the url is being returned as null.

I checked the database and it is updating fine.  ie if i type a url into the editpage then click update the new url is in the database just not on the screen.

Anyway i've been stuck on this for a while and wondered if you guys could notice something obvious i'm missing.

 
New Post 10/1/2008 4:36 PM
User is offline Sebastian Leupold
15051 posts
www.deutschnetnuke.de
1st Ranked












Re: Problem using DataProviders 

did you consider to use the URL control to enter the URL? there might be an issue with html encoding or sth loke this, you might have a look at the links module source, how it utilizes the URL.


Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
New Post 10/2/2008 2:57 AM
User is offline som4
78 posts
10th Ranked


Re: Problem using DataProviders 

I don't think its a problem with how i'm displaying the data, as theres no data to display. 

The module i've created (BestSellers) is able to get its info class from the database but the extra parameter i added 'ImgUrl' is always returned null.  If i look directly at the database i correctly set the url when i entered it in the edit page.  It just can't retrieve it.

I've checked the stored procedures and everything looks fine. 

create procedure {databaseOwner}{objectQualifier}YourCompany_GetBestSellers

    @ModuleId int,
        @ItemId int

as

select ModuleId,
       ItemId,
       Content,
       Url,
       CreatedByUser,
       CreatedDate
from {objectQualifier}YourCompany_BestSellers with (nolock)
left outer join {objectQualifier}Users on {objectQualifier}YourCompany_BestSellers.CreatedByUser = {objectQualifier}Users.UserId
where  ModuleId = @ModuleId
and ItemId = @ItemId
GO
 

Heres some of the load_page code:

BestSellersController objBestSellerss = new BestSellersController();
BestSellersInfo objBestSellers = objBestSellerss.GetBestSellers(ModuleId, ItemId);
if (objBestSellers.ImgUrl != null)
{
    lblStatus.Text = "url: " + objBestSellers.ImgUrl + " contents: " + objBestSellers.Content;
    txtUrl.Text = objBestSellers.ImgUrl;
    txtContent.Text = objBestSellers.Content;
    ctlAudit.CreatedByUser = objBestSellers.CreatedByUser.ToString();
    ctlAudit.CreatedDate = objBestSellers.CreatedDate.ToString();                           
}

In the above code I am trying to retrieve the data to display in the edit page on page_load. txtContent.Text = objBestSellers.Content; works fine.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  Problem using DataProviders
 


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.

 


Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com
Smart-Thinker
DNN Modules for Social Networks for as low as $69 for 6 modules! We also maintain the DotNetNuke Directory - http://DNNDir.com
www.smart-thinker.com

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