Getting Help with an Error Message

Here are some suggestions regarding help with error messages:.  

1) Read the error message carefully and note the line number -- too often there is a tendency to immediately go back to the code and try to discover the problem without having thought through the error message and what sort of error might give rise to that error message.

2) A line number in an error message typically means that the error is in that line or earlier.  As your page gets longer, you will want to use a text editor or HTML editor with line numbers.  Notepad and WordPad don't display line numbers.  Although there is some way in Notepad (which I've forgotten and it doesn't seem to be in Notepad help) to jump to a specific line number, it would be better to use an editor with better line number capability: 

FrontPage - In HTML view, the line number and character position of the cursor are shown in the status line

Dreamweaver - If you are in View Code or View Code and Design, go to View, Code View Options, and check the Line Numbers entry to display line numbers

Use a text editor with line number capability - e.g. TextPad.  You can download some of these for free.

3) In client-side scripting, for example JavaScript or VBScript that runs in the browser, different clients (browsers) will often generate different error messages regarding the same error.  Therefore, if you are having trouble understanding the error based on one browser's error message, look at the page in another browser to see if you can get more information about  the error.  In server-side scripting such as Active Server Pages or Cold Fusion, different browsers will all display the same server-side error message so switching browsers is not useful to get further information.  The one exception is that sometimes Internet Explorer will display a message "Page can't be displayed" or something of the sort but only down at the bottom of the page (which you are likely to miss) do you see the specific server-side error message.  For Active Server Pages, if you want to know what sort of problems might generate a given error message, it is sometimes useful to a search of the Knowledge base on the Microsoft web site for the given error.

4) Getting help from the instructor -- Here's what works best for me:

a) Getting help in person is generally more efficient than email.  You get immediate help without having to wait for me to respond to email and you can show me stuff and I can respond verbally without me having to download it and then send you an email.  This doesn't mean wait till the next class to ask me; instead it means having done the work before hand so you can ask me in class.  Of course, problems may come up later and you will have to then email.  If you email, here are some suggestions:

b) FTP the files to your website and email me the URL rather than attaching files to email.  This is generally better for several reasons.  First, when I am reading email, I don't have to wait for your files to download to see the rest of my email -- this isn't an issue for HTML files, but it is for images and databases.  Second, if you email me the files and the problem involves multiple files, I must save each attachment to my hard drive, and then go find the download and open it up in a browser.  However, if you are FTPing files that run on the server, such as ASP or Cold Fusion files, you must also save the file in .txt format so that I can view the text of the file.

c) Be specific about error messages and what you did.  Let's look at some emails I got today:

1) "I have completed the assignment and uploaded it but it is giving me a recordset error.  I cannot troubleshoot it ... I am attaching the files so you can try to trouble shoot for me, please."

Merely saying that requires me to do the following:

-save the files from the email to my hard drive (see above)
-test the code and see what the exact error message is
-go into the code and see what line is generating the error

Instead, if the files are FTP'd, I'm given the exact error message (cut and paste it), and I'm given the text of the line (cut and paste it) that is generating the error message, I can respond much more easily.

2) "I FTP'd my work up to the gsawebdev site...I tried to access it using my ... user name and got a You are not authorized to view this page.  Please advise"

Here I can make a pretty good guess of what the problem is, but notice I'm not told what the file names are on the website nor what the student did to try to access it.  

3) "I can't view my source.asp file, although it is on the server. Please let me know if you know what I am doing wrong."

No indication of how the student is trying to view the file.

So in general be specific, but without going overboard.

Revised: September 27, 2002.  Comments to William Pegram, wpegram@nvcc.edu