Forum Discussion
tristaanogre
15 years agoEsteemed Contributor
Change your code to the following:
Note the underlined code. Two problems I corrected here. First, the second parameter after your command line, what is indicated as 1 in the code I've pasted, was missing entirely. Secondly, instead of commas seperating parameters, you were concatenating the true parameter to the command line.
As noted above, please read http://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.85).aspx for more information about the specific syntax of using the Run command of the shell object.
Function LGComponentes
Dim ShellObj
Set ShellObj = Sys.OleObject("WScript.Shell")
Call ShellObj.Run(ComandoCriarTabela & "1.LGComponentes\SQLServer\1.sql -o " &DirLog&"1.txt", 1, true)
End Function
Note the underlined code. Two problems I corrected here. First, the second parameter after your command line, what is indicated as 1 in the code I've pasted, was missing entirely. Secondly, instead of commas seperating parameters, you were concatenating the true parameter to the command line.
As noted above, please read http://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.85).aspx for more information about the specific syntax of using the Run command of the shell object.