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

Least Expensive Way to Debug asp 1

Status
Not open for further replies.

willz99ta

IS-IT--Management
Sep 15, 2004
132
US
Hi and thanks for helping (or just reading) my quesions.

I wrote some ASP in Dreamweaver and now it has a problem. What is the easiest/cheapest way to debug my code?

Thanks,
Will
 
post it here, if someone knows what's wrong with it, they'll give you a free answer - can't beat that :)

--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
Yep you can't beat that! Although I found the problem myself (variable differences on the page), thanks for your help.

I still wish there was an Eclipse or Dreamweaver plugin.

Thanks again,
Will
 
OPTION EXPLICIT will save you

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
OPTION EXPLICIT will save you

for variables names - yes. But if the issue was not with variable names, then OPTION EXPLICIT won't help much.

--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
1. What's the bug?
2. Please wrap your code within
Code:
block, much each to read...




--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
Thanks for the help. The problem is that it says the page cannot be displayed. It is giving me a HTTP Internal server error.

Here is the code:

Code:
If strChildEmp = "No" then

strEmailMaster = "email@email.com"
'Build the message body for the Email
Dim strMessageBody, strMessageBody2, strSubject, strSubject2, fline, strReplyURL, strFormURL
strFormURL = "[URL unfurl="true"]http://cmc-childnet/ChildNet/Departments/MaterielsManagement/PrintReceivingIssueForm.asp?RequesterNumber="[/URL] & strRequesterNumber
strReplyURL = "email@email.com"
strSubject = "Receiving Issue Form Submitted by the Purchasing Staff" & vbCRLF
fline = "________________________________________________________________________________"  & vbCRLF & vbCRLF
strMessageBody = strMessageBody & "" & vbCRLF & vbCRLF ' Put the body together
strMessageBody = strMessageBody & "" & vbCRLF
strMessageBody = strMessageBody & fline
strMessageBody = strMessageBody & "Date: " & Date & "" & vbCRLF
strMessageBody = strMessageBody & "A receiving request has been submitted by Purchasing staff." & vbCRLF
strMessageBody = strMessageBody & "Research for this receiving request identified that the delivery" & vbCRLF 
strMessageBody = strMessageBody & "was made and signed by an individual not employed with Children's." & vbCRLF 
strMessageBody = strMessageBody & "To review this request, please click the below hyperlink." & vbCRLF & vbCRLF 
'Put the body together
strMessageBody = strMessageBody & strFormURL & vbCRLF & vbCRLF 'Reply URL gets added here


strSubject2 = "Receiving Issue Form Submitted - Second Email"
strMessageBody2 = strMessageBody2 & "A Receiving Issue Form has been submitted." & vbCRLF & vbCRLF 'Reply URL gets added here
'strMessageBody2 = strMessageBody2 & strFormURL & vbCRLF & vbCRLF 'Reply URL gets added here

Else

strEmailMaster = "email@email.com"
'Build the message body for the Email
Dim strMessageBody, strMessageBody2, strSubject, strSubject2, fline, strReplyURL, strFormURL
strFormURL = "[URL unfurl="true"]http://cmc-childnet/ChildNet/Departments/MaterielsManagement/PrintReceivingIssueForm.asp?RequesterNumber="[/URL] & strRequesterNumber
strReplyURL = "email@email.com"
strSubject = "Receiving Issue Form Submitted by Purchasing" & vbCRLF
fline = "________________________________________________________________________________"  & vbCRLF & vbCRLF
strMessageBody = strMessageBody & "" & vbCRLF & vbCRLF ' Put the body together
strMessageBody = strMessageBody & "" & vbCRLF
strMessageBody = strMessageBody & fline
strMessageBody = strMessageBody & "Date: " & Date & "" & vbCRLF
strMessageBody = strMessageBody & "A Receiving Issue form has been submitted by Purchasing." & vbCRLF
strMessageBody = strMessageBody & "" & vbCRLF & vbCRLF
strMessageBody = strMessageBody & "Please click on the below hyperlink to complete the request." & vbCRLF 
' Put the body together
strMessageBody = strMessageBody & strFormURL & vbCRLF & vbCRLF 'Reply URL gets added here


strSubject2 = "Receiving Issue Form Submitted - Second Email"
strMessageBody2 = strMessageBody2 & "A Receiving Issue Form has been submitted." & vbCRLF & vbCRLF 'Reply URL gets added here
'strMessageBody2 = strMessageBody2 & strFormURL & vbCRLF & vbCRLF 'Reply URL gets added here
 
End If

Thanks again for your help,
Will
 
I believe the problem is coming from the if statement in this code snippet.

The strChildEmp variable comes from a radio button on the page before and it assigned by:
Code:
strChildEmp=request.form("ChildEmp")
 
To see the full error message, and not the generic "page cannot be displayed", see faq333-5427.

Regarding strChildEmp possibly being null, try:
Code:
strChildEmp=request.form("ChildEmp") & ""

 
Found the problem -- I was Dim-ing the same variables on both sides of the if statement.

Will
 
In the future, it will be helpful to turn off "Friendly HTTP Error Messages" in your browser.

In ie, goto tools-->Advanced, scroll down and uncheck 'Show Friendly HTTP Error Messages". This will cause the ugly guts of the problem to spill out onto the screen, but if that's what you want to see then thats what you want to see. ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top