>From my .NET application, I need to be able to execute a script against SQL Server. I have this script. It takes about 0.5 second to execute. I need to have it from the Web administration interface so I wouldn't have to get into SQL Server to execute it.
>
>Is the best approach to create a stored procedure and use my regular data class from the framework to execute this? Or, is there a way to have this script sitting in a directory and simply executing it and collect the result into a TXT file?
If you want to execute script directly you may want to check
http://forums.asp.net/p/1379288/2911157.aspx#2911157 (last few messages in this thread).
If it's not broken, fix it until it is.
My Blog