How do I detect error while running script with "osql" utility?
Thanks in advance!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()


Reply With Quote