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
1/20/2006 3:43 PM
 

I tried to configure dnn to use banners and got the error screen that states 'dbo.dnn_FindBanners' stored procedure doesn't exist.  Checked the database and it doesn't exist.  I was wondering if this is a bug in the code calling a procedure that is now not included in 4.0.2, or a configuration error - something not setup prior to turning banners on.

Any help would be appreciated.

Thanks.

 
New Post
1/21/2006 9:38 AM
 

i've just done a test install of 4.02 and that sproc is created fine for me. Please check out your \Providers\DataProviders\SqlDataProvider folder, and examine the .log files to see what went wrong, and post the error here. If you just want to create the sproc, this should work

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,
        dnn_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,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

 


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/21/2006 6:16 PM
 

I had a similar problem when installing both the 3.2.2 and the 4.02 DotNetNuke framework on two different machines. This is the log I got:

===========================================================================

System.Data.SqlClient.SqlException: The column prefix 'Banners' does not match with a table name or alias

name used in the query.
The column prefix 'Banners' does not match with a table name or alias name used in the query.
The column prefix 'Files' does not match with a table name or alias name used in the query.
The column prefix 'Files' does not match with a table name or alias name used in the query.
The column prefix 'Files' does not match with a table name or alias name used in the query.
The column prefix 'Banners' does not match with a table name or alias name used in the query.
The column prefix 'Banners' does not match with a table name or alias name used in the query.
The column prefix 'Banners' does not match with a table name or alias name used in the query.
The column prefix 'Banners' does not match with a table name or alias name used in the query.
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType

commandType, String commandText, SqlParameter[] commandParameters)
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType

commandType, String commandText, SqlParameter[] commandParameters)
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType

commandType, String commandText)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


create procedure [MyDBUser].Prefix_FindBanners

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

AS

SELECT  BannerId,
        Banners.VendorId,
        BannerName,
        URL,
        'ImageFile' = case when Files.FileName is null then Banners.ImageFile else Files.Folder +

Files.FileName end,
        Impressions,
        CPM,
        Banners.Views,
        Banners.ClickThroughs,
        StartDate,
        EndDate,
        BannerTypeId,
        Description,
        GroupName,
        Criteria,
        Banners.Width,
        Banners.Height
FROM    Prefix_Banners
INNER JOIN Prefix_Vendors ON Prefix_Banners.VendorId = Prefix_Vendors.VendorId
LEFT OUTER JOIN Prefix_Files ON Prefix_Banners.ImageFile = 'fileid=' + convert

(varchar,Prefix_Files.FileID)
WHERE   (Prefix_Banners.BannerTypeId = @BannerTypeId or @BannerTypeId is null)
AND     (Prefix_Banners.GroupName = @GroupName or @GroupName is null)
AND     ((Prefix_Vendors.PortalId = @PortalId) or (@PortalId is null and Prefix_Vendors.PortalId is

null))
AND     Prefix_Vendors.Authorized = 1
ORDER BY BannerId

===========================================================================

I solved the problem by creating the SP manually. Also note, that the user does not realize that the SP is missing until a banner mode is selected from the host menu.

Cheers,

Ivan

 
New Post
1/26/2006 10:39 AM
 

Here's the log file that talks about enabling the banners on the site.

System.Data.SqlClient.SqlException: The multi-part identifier "Banners.VendorId" could not be bound.
The multi-part identifier "Files.FileName" could not be bound.
The multi-part identifier "Banners.ImageFile" could not be bound.
The multi-part identifier "Files.Folder" could not be bound.
The multi-part identifier "Files.FileName" could not be bound.
The multi-part identifier "Banners.Views" could not be bound.
The multi-part identifier "Banners.ClickThroughs" could not be bound.
The multi-part identifier "Banners.Width" could not be bound.
The multi-part identifier "Banners.Height" could not be bound.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
   at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText)
   at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)


create procedure dbo.dnn_FindBanners

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

AS

SELECT  BannerId,
        Banners.VendorId,
        BannerName,
        URL,
        'ImageFile' = case when Files.FileName is null then Banners.ImageFile else Files.Folder + Files.FileName end,
        Impressions,
        CPM,
        Banners.Views,
        Banners.ClickThroughs,
        StartDate,
        EndDate,
        BannerTypeId,
        Description,
        GroupName,
        Criteria,
        Banners.Width,
        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

Any help fixing this would be appreciated.

Thanks,

 
New Post
1/26/2006 1:59 PM
 

It's an issue with the findbanners script in 3.2.2, that only causes a failure if you're using an objectqualifer, as a few fields are missing it. The fix is checked in for the next version, but either try my script of amend your script as the error is indicating i.e

when it says "The multi-part identifier "Banners.VendorId" could not be bound."

it's because the script contains banners.vendorid and not dnn_banners.vendorid.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
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