How to execute sql script file in Sql Server 2008
I want to execute a sql script file if user want to apply the new database changes. That script file is present on the server and if user wants to apply the new changes it just press a button i want to know how to execute that script file to a particular server database in Sql Server 2008. I want to do this in C# code file
Google c# SqlConnection, SqlCommand
Look at the example provided here
Note: if the sql is in a file you will have to read the content of the file into a string first!