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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Problem using DataProvidersProblem using DataProviders
Previous
 
Next
New Post
10/1/2008 10:14 AM
 

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 6:36 PM
 

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.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/2/2008 4:57 AM
 

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
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Problem using DataProvidersProblem using DataProviders


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