I am wondering if anyone has any examples of how to run multiple sql statements from a file using .net? I want to automatically install any stored procedures or scripts from a single file on the server when my web application runs for the first time. Thanks for your help in advance!
You use SP_EXECUTESQL for that in SQL Server, it is a system stored procedure in the Master database. Try the link below for Microsoft article about SP_EXECUTESQL and run a search for same in the BOL(books online) for more info. Hope this helps.
http://support.microsoft.com/default.aspx?scid=kb;en-us;262499
No comments:
Post a Comment