I keep getting an error in my .SqlDataProvider files. I also get the same error if I try to run the file by loading it through the "SQL" menu item under host.
The problem appears to occur near the word "GO" in my scripts.
I am using DNN 4.5.3 and have I saved the .SqlDataProvider files as text with UTF-8 encoding. I am using SQL Server 2005 (Free/Express Edition)
I can run individual lines of the script if I strip out the "GO" keywords and the script runs fine under SQL Server Management Studio.
I'm baffled. Can someone give me a clue as to what is going on.
As an example:
THIS DOES NOT RUN:
if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}MingHsueh_AddInstitution]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure {databaseOwner}[{objectQualifier}MingHsueh_AddInstitution]
GO
I get There is an error in your query!
However this runs fine.
if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}MingHsueh_AddInstitution]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure {databaseOwner}[{objectQualifier}MingHsueh_AddInstitution]
Thanks to anyone who can help.