I have a DNN Module Install Zip with a sqldataprovider and the first procedure created created a procedure that alters a table and adds some columns. But all it does is create the procedure. I also need it to run and create the columns or the other stored procedures in the datasqlprovider fail because the columns are not there. so I have this:
-- Create stored procedure
CREATE procedure {databaseOwner}[AlterLeads]
As
ALTER TABLE namaocs.dbo.lead
ADD Downloaded bit
ALTER TABLE namaocs.dbo.lead
ADD DateTime DATETIME
ALTER TABLE namaocs.dbo.lead
ADD UserId INT
GO
It creates the stored procedure fine, I just need it to actually run to create the columns so the other stored procedures run successfully. Any ideas?
There's no reason to create a Stored Procedure for this. A Stored Procedure is for something you'll want to run multiple times. You only need to run these three statements once. Just get rid of the first three lines so that you just have the ALTER statements.