debugging classic asp

fguihen
10-09-2006, 09:15 AM
I have a site in classic asp.
A user selects various parameters. these are fed into a stored proc call in sql server, which returns the data.

I am having an issue, where when a user selects their parameters and clicks the submit button, there is an error with the returned data.

The asp page simply directs the browser to a default page when an error occours using this:

<%If Err.Number <> 0 Then

' Error has occurred so redirect to Error page
Response.Clear
Response.Redirect "/Error.asp"

End If
%>

i wanted ot see the exact error so i removed this code, and hey presto, the app displays all the correct data!! i think it may be a conflict between asp datatypes and sql datatypes or something stupid. i need to know, how do i debug this? how do i get the asp page to show me where it has an error? although its working now, id like to resolve this a bit more permanently, as the error control code is there for a reason.


thanks all

wayneph
10-09-2006, 01:39 PM
If you take out "On Error Resume Next" it will die on the first error it gets to.

If you leave that in, you'll have to put an "If Err.Number<>0 Then" check after every line that could potentially have problems.

(Since all variables in Classic ASP are varients, I doubt it is a conflict in datatypes. I would lead more to a Null value...)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum