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 ...dbo.dnn_FindBanners stored procedure doesndbo.dnn_FindBanners stored procedure doesn't exist
Previous
 
Next
New Post
2/14/2006 12:06 AM
 

THANK YOU!!  I am using an objectQualifier on DNN 4.0.2 and cathal's post worked like a charm.  I copied his stored proceedure and modifed it to reflect my objectQualifier and it worked! 

By the way, I'm also using TextHTML Versioner (by Ben Becker, a.k.a 3.1HTMLArchiveV01.00.01) as well and had to rename the ArchiveHtmlGetVersions stored proceedure to reflect my objectQualifier and now TextHTML Versioner is working great!

Thanks again!

 
New Post
2/24/2006 11:43 AM
 

I finally got this proc to work, but had to modify the code (marked in red) to get it to work.  This was running the script directly in SQL Express, I did not try running it under the Host/SQL in DNN.

 

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


create procedure dbo.dnn_FindBanners

@PortalId     int,
@BannerTypeId int,
@GroupName    nvarchar(100)

AS

SELECT  BannerId,
        dnn_Banners.VendorId,
        BannerName, 
        URL,
        'ImageFile' = case when dnn_Files.FileName is null then dnn_Banners.ImageFile else dnn_Files.Folder + dnn_Files.FileName end,
        Impressions,
        CPM,
        dnn_Banners.Views,
        dnn_Banners.ClickThroughs,
        StartDate,
        EndDate,
        BannerTypeId,
        Description,
        GroupName,
        Criteria,
        dnn_Banners.Width,
        dnn_Banners.Height
FROM    dnn_Banners
INNER JOIN dnn_Vendors ON dnn_Banners.VendorId = dnn_Vendors.VendorId
LEFT OUTER JOIN dnn_Files ON dnn_Banners.ImageFile = 'fileid=' + convert(varchar,dnn_Files.FileID)
WHERE   (dnn_Banners.BannerTypeId = @BannerTypeId or @BannerTypeId is null)
AND     (dnn_Banners.GroupName = @GroupName or @GroupName is null)
AND     ((dnn_Vendors.PortalId = @PortalId) or (@PortalId is null and dnn_Vendors.PortalId is null))
AND     dnn_Vendors.Authorized = 1
ORDER BY BannerId


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

Thanks for the assistance,

Steve

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...dbo.dnn_FindBanners stored procedure doesndbo.dnn_FindBanners stored procedure doesn't exist


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