1) OSQL is a command line utility so you could spawn a process with Shell.Execute() and pass in appropriate args...
--OR--
2) All functionaility in OSQL and/or the Enterprise Manager is available via the SQL-DMO {Data Management Objects} COM interfaces. You can add a reference to the COM libraries in your C# project and then use the DMO objects. Documentation for DMO is in SQL Server Books Online...
--Richard
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.