Guess this is why...Tables seem to have been created OK though?
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.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 colm3rd_mssql.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