Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem seeing where process fails

Status
Not open for further replies.

danmul

Programmer
Jan 16, 2003
89
IE
Hi,
I can run a vb process from the command line o the server and it runs fine. when I call it from my application it fails half way. I use commands like this to view results when I run from command line
Wscript.echo "Command = Did I get here "
but when I run from the application it runs in background and does not show any messages. Is there a setting I can set so I can view messages no matter what.
Thanks in advance,
Daniel.
 
How are you running it from the application? Is it an application that you created? If so, what is the code that runs the script? You could also consider converting your WScriot.Echo commands to MsgBox commands, but this gets tedious if there are very many of them. You can also have the information written to a log file. Depending on how the script is being called, you may even be able to redirect it's STDERR to a file as well.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
I go for a generic sub routine for debugging
something like

Sub Debuggin(ByVal str2Write, ByVal blnSilent,ByVal blnMsgbox, ByVal logFile, ByVal blnEventLog)
If blnSilent = False....
End Sub

anyway as TTKP has rightly suggested whichever way you go you cant beat a good log file!!
 
Hi,
sorry but I do not know much about vbscripts. I use oracle forms to call my vbscript. It uses a host command to kick off the vbscript. I have been asked to change someone elses script, basically add extra parameters but when I add any parameters it fails. If I add in a Wscript.echo command it hangs and I have to kill my application. A log file looks like a better option. I will try to get some code to write a log file.

Thanks,
Daniel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top