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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file suddenly does not work!

Status
Not open for further replies.

rlh145

Programmer
Feb 19, 2001
36
US
I am using a vb script file to download a text file to a mainframe. It has been working like a charm for several weeks. It suddenly stopped working; we have been able to run the code in ftp mode. The file that the script creates seems to work under ftp also. But when I execute the script file as before, no file gets written.

My question is this. How can I set up my script file to capture the results of its execution?

Thanks for any help!

Ralph
 
you've got to give us more to work with here! show us some code; explain better what is/isn't happening. Is your question that you want to be able to find out where in the code it's not working? If so, try putting in some response.write's or msgbox's so you can see where you're getting or not getting.
 
You could also try to trap the error(s) that occur.
This is one way to do it:

First, if this line exist:
Code:
  On Error Resume Next
then comment it out.

Next, add the line:
Code:
  On Error Goto ErrorHandler
(This should be added early in the code, preferably right after:
Code:
  <%@ LANGUAGE = VBScript %>
(which should be the first line).)

Then make an ErrorHandler method, e.g. like this:
Code:
Sub Errorhandler()
   Response.Clear
   Response.Write(&quot;Error: &quot; & Err.Source & &quot;<br>&quot;)
   Response.Write(&quot;Error number: &quot; & Err.Source & &quot;<br>&quot;)
   Response.Write(&quot;Error description: &quot; & Err.Description & &quot;<br>&quot;)
   Response.End
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top