I'm trying to package up a module but am experiencing problems getting one part of the SqlDataProvider script to work. Whenever I try to add a CREATE VIEW command, the script fails during module installation when I try to test it. Remove the CREATE VIEW and it works fine. However, the CREATE VIEW is required for proper operation of the module (tried removing the GO after the CREATE PROCEDURE statement). Any ideas?
CREATE PROCEDURE [dbo].[PRP_UpdateRegion]
(
@EntryID int,
@RegionCode nvarchar(100),
@RegionName nvarchar(150),
@ParentID int
)
AS
UPDATE PRP_Lists SET Value = @RegionCode, [Text] = @RegionName, ParentID = @ParentID
WHERE EntryID = @EntryID
RETURN
GO
CREATE VIEW [dbo].[PRP_Property_Query]
SELECT dbo.PRP_Properties.PropertyID, dbo.PRP_Properties.Name, dbo.PRP_Properties.Address, dbo.PRP_Properties.Address2, dbo.PRP_Properties.Town,
dbo.PRP_Properties.Country, dbo.PRP_Properties.Region, dbo.PRP_Properties.Postcode, dbo.PRP_Properties.Telephone, dbo.PRP_Properties.Fax,
dbo.PRP_Properties.Email, dbo.PRP_Properties.Website, dbo.PRP_Properties.ContactName, dbo.PRP_Properties.PropertyType,
dbo.PRP_Properties.EntryTypeID, dbo.PRP_Properties.IsNewDevelopment, dbo.PRP_Properties.MinBedrooms, dbo.PRP_Properties.MaxBedrooms,
dbo.PRP_Properties.MinReceptionRooms, dbo.PRP_Properties.MaxReceptionRooms, dbo.PRP_Properties.MinBathrooms,
dbo.PRP_Properties.MaxBathrooms, dbo.PRP_Properties.GardenID, dbo.PRP_Properties.ParkingID, dbo.PRP_Properties.StatusID,
dbo.PRP_Properties.Summary, dbo.PRP_Properties.FullDescription, dbo.PRP_Properties.GradingID, dbo.PRP_Properties.MinSleeps,
dbo.PRP_Properties.MaxSleeps, dbo.PRP_Properties.IsMultiple, dbo.PRP_Properties.AgentID, dbo.PRP_Properties.MinPrice,
dbo.PRP_Properties.MaxPrice, dbo.PRP_Properties.Currency, dbo.PRP_Properties.PortalID, dbo.PRP_Properties.ExpiryDate,
dbo.PRP_Agents.Name AS AgentName, dbo.Lists.Text AS PropertyTypeName, dbo.PRP_Properties.Features, dbo.PRP_Properties.RentalPeriod,
dbo.PRP_Properties.DateAdded
FROM dbo.PRP_Properties LEFT OUTER JOIN
dbo.Lists ON dbo.PRP_Properties.PropertyType = dbo.Lists.EntryID LEFT OUTER JOIN
dbo.PRP_Agents ON dbo.PRP_Properties.AgentID = dbo.PRP_Agents.AgentID