Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing a script from .NET
Message
From
10/03/2009 08:37:24
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01386831
Message ID:
01386863
Views:
50
>>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?
>
>I would suggest to simply use Stored Procedure.

I would agree. I'm not sure what you would gain by executing a script file instead of just a Stored Procedure.
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform