CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Threaded View

  1. #1
    Join Date
    Feb 2001
    Posts
    872

    Detect error encountered while running script from "osql.exe" utility?

    How do I detect error while running script with "osql" utility?

    Code:
    Dim cmd As String = "osql.exe"
    Dim args As String ="-S localhost -U joe -P xxx -d master -i"
    Dim fullCmd As String = args + " '" + scriptfile + "'"
    
    info = New ProcessStartInfo(cmd, fullCmd)
    info.UseShellExecute = False
    
    ps = Process.Start(info) 'Is there any way to monitor if any error encountered during script execution?
    ps.WaitForExit()
    Thanks in advance!
    Last edited by THY02K; February 13th, 2005 at 10:26 PM. Reason: Formatting

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured