#7293

kenny
Member

OK, I have it now. Many thanks for your help

Missed a set statement.
code should have been
sServer = prompt(“Enter Server”, “MyServer”)
sDatabase = prompt(“Enter Database”, “MyDB”)
sFileName = “MyFile.txt”
sCmdline = “-w””2000″” -S””” + sServer + “”” -E -d””” + sDatabase + “”” -n -t28800 -I -i””” + sFileName + “”””

set wsh = CreateObject(“WScript.Shell”)
set wExec = wsh.exec(“osql.exe ” + sCmdline)

OutputBar.Visible = true
OutputBar.SetFocus()
OutputBar.writeln(“——–“)
OutputBar.write(wExec.StdOut.ReadAll())
OutputBar.write(wExec.StdErr.ReadAll())