Unanswered: Using SQLDMO to create a stored procedure from a file
I am attempting to write a C# program that will create stored procedures that are aalready defined/programmed in SQL script files.
So far, I have been able to get connected to my database and created a stored procedure by setting the SQLDMO.StoredProcedure.Text property. But, the real goal is to load and execute scripts that have the stored procedure definition already in them.
Here's what my code looks like AFTER I have gotten the connection to my database:
SQLDMO.StoredProcedure sp = new SQLDMO.StoredProcedure();
sp.Name = "DAVE";
sp.Owner = "[dbo]";
sp.Type = SQLDMO.SQLDMO_PROCEDURE_TYPE.SQLDMOProc_Standard;
sp.Text = "Create procedure [dbo].DAVE as select * from systemrelease";