Hello,
If I should be posting this item elsewhere, please let me know. However, I think someone who knows the Events Module may be helpful.
I'm trying to publish my local database to GoDaddy hosting using the MS Database Publishing Wizard. I have tried with databases for two different DNN installations and the process has failed on both occasions while trying to create procedure GetEventsByDate.
Objets are being creat Ok on the remote but the process fails with the message below. There are references to "invalid column names". I don't know if the CREATE PROCEDURE command validates the existence of referenced columns or tables. Also, from my limited experience wth SQL, I believe an error message could describe an error that is only a consequence of whatever the original unidentified error is.
I am not an expert in SQL but I wonder if there may be some syntax problem in the procedure. For example I hadn't seen syntax like the use of two single quotes as there are around ''IconFile'' in a SELECT clause like the procedure has.
ie:
.
.
Events.Period,
''IconFile'' = case when Files.FileName is null then Events.IconFile else Files.Folder + Files.FileName end,
.
.
.
The error messages are below. Any help is appreciated.
Thanks,
Ivan Torres
--------------------------------------------------------------------------
TITLE: SqlPubWiz
An error occured while trying to publish the following script:
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetEventsByDate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE procedure [dbo].[GetEventsByDate]
@ModuleId int,
@StartDate datetime,
@EndDate datetime
as
select
Events.ItemId,
Events.ModuleId,
Events.Description,
Events.DateTime,
Events.Title,
Events.ExpireDate,
Events.CreatedByUser,
Events.CreatedDate,
Events.Every,
Events.Period,
''IconFile'' = case when Files.FileName is null then Events.IconFile else Files.Folder + Files.FileName end,
Events.AltText
from Events
left outer join Files on Events.IconFile = ''fileid='' + convert(varchar,Files.FileID)
where ModuleId = @ModuleId
and ( (Period is null and (DateTime >= @StartDate and DateTime <= @EndDate)) or Period is not null )
order by DateTime
'
END
(SqlPubWiz)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.PublishToWebWriterProvider.PublishScript(String script)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.PublishToWebWriterProvider.PublishCachedScript()
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.PublishToWebWriterProvider.WriteLine(String script)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptWriter.Write(String script, Boolean useBatch)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptWriter.Write(String script)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptObjectContainer.AppendScriptFragment(ScriptWriter scriptWriter, IEnumerable fragment)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptObjectContainer.AppendCreateScript(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptObjectContainer.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptedObjectCollection.ScriptAll(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.DependencyScriptHandler.ScriptCore(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptHandler.Script(ScriptWriter scriptWriter)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.SingleScriptTarget.OnScriptingFinished(Object source, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptProcessor.OnScriptingCompleted()
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptProcessor.GenerateScript()
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptingEngine.GenerateScript()
at Microsoft.SqlServer.Management.SqlManagerUI.Scripting.ScriptingDriver.GenerateScript()
at Microsoft.SqlServer.Management.SqlManagerUI.GenerateScriptMaker.DoScript()
at Microsoft.SqlServer.Management.SqlManagerUI.GenScriptWizform.Script()
===================================
Invalid column name 'IconFile'.
Invalid column name 'DateTime'.
Invalid column name 'DateTime'.
Invalid column name 'ItemId'.
Invalid column name 'Description'.
Invalid column name 'DateTime'.
Invalid column name 'Title'.
Invalid column name 'ExpireDate'.
Invalid column name 'CreatedByUser'.
Invalid column name 'IconFile'.
Invalid column name 'AltText'. (System.Web.Services)
------------------------------
Program Location:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)