I often have to 'Generate Scripts' for stored procedures on SQL Server Management Studio. I need to create a WPF app that will take the file produced and execute it. I know you can do this:
SqlCommand insert = new SqlCommand(sql, conn);
insert.ExecuteNonQuery();
If I pass the entire scripts file text into sql, will this execute everything?