Call OSQL Command

  • Thread starter Thread starter Tiago Costa
  • Start date Start date
T

Tiago Costa

I want to call a OSQL command to BackUp my data base, how can i call it from
Visual Studio (C#) 2003.



Thanks In Advance,

Tiago Costa
 
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
 
Back
Top