Forum Discussion
Jackson_L
15 years agoContributor
Hello
I may be mistaken, but from the log file it doesn't look like the Log.Message was directly above the Run command line. The log shows the Run Command message then there were keyboard inputs then the exception.
To make sure we're both on the same page, can you change your code to:
Function LGComponentes
Dim ShellObj
Set ShellObj = Sys.OleObject("WScript.Shell")
Log.Message("Run Command: " & ComandoCriarTabela & "1.LGComponentes\SQLServer\1.sql -o " &DirLog&"1.txt")
Call ShellObj.Run(ComandoCriarTabela & "1.LGComponentes\SQLServer\1.sql -o " &DirLog&"1.txt", 1, true)
Log.Message("Run command has completed.")
End Function
Now if you see the second log message you know the run command has completed, your sql output should be saved to 1.txt and TC will continue with the next operation.
Cheers,
Jackson
I may be mistaken, but from the log file it doesn't look like the Log.Message was directly above the Run command line. The log shows the Run Command message then there were keyboard inputs then the exception.
To make sure we're both on the same page, can you change your code to:
Function LGComponentes
Dim ShellObj
Set ShellObj = Sys.OleObject("WScript.Shell")
Log.Message("Run Command: " & ComandoCriarTabela & "1.LGComponentes\SQLServer\1.sql -o " &DirLog&"1.txt")
Call ShellObj.Run(ComandoCriarTabela & "1.LGComponentes\SQLServer\1.sql -o " &DirLog&"1.txt", 1, true)
Log.Message("Run command has completed.")
End Function
Now if you see the second log message you know the run command has completed, your sql output should be saved to 1.txt and TC will continue with the next operation.
Cheers,
Jackson