Home All Groups Group Topic Archive Search About

Stopping running code at a certain point



Author
9 Mar 2005 5:17 PM
Jack
Hi,
I have a asp page which is pretty long. This consitst of various recordsets.
My intention is to stop execution of a code at a cetain point and test one
value prior to this point. Is there any way to do this? Thanks in advance.
Regards.

Author
9 Mar 2005 6:31 PM
McKirahan
"Jack" <J***@discussions.microsoft.com> wrote in message
news:3F08ABE0-7976-4FEA-9BDA-2D8165E76DA1@microsoft.com...
> Hi,
> I have a asp page which is pretty long. This consitst of various
recordsets.
> My intention is to stop execution of a code at a cetain point and test one
> value prior to this point. Is there any way to do this? Thanks in advance.
> Regards.

An "If" statement comes to mind as in:

    If item = value Then
        ' do something
    End If

Perhaps a more detailed description of the issue would suggest a different
answer.

What do you mean by "stop execution of the code"?

Will this require user interaction?
Author
9 Mar 2005 7:11 PM
Jack
Thanks McKirahan for your answer. Actually, I need to log into the system.
That is the only user interaction. I would like to check couple of values of
variables which are in the middle of the code. Just after this, the code is
giving error. I was wondering if I could open the web page and the code would
run upto this point of extracting the values of couple of variables and not
execute any further which, at this point, if runs, will give me error in the
page. Hope I am clear.
I am going to test Vic's suggestion, to see if that works. Regards.

Show quote
"McKirahan" wrote:

> "Jack" <J***@discussions.microsoft.com> wrote in message
> news:3F08ABE0-7976-4FEA-9BDA-2D8165E76DA1@microsoft.com...
> > Hi,
> > I have a asp page which is pretty long. This consitst of various
> recordsets.
> > My intention is to stop execution of a code at a cetain point and test one
> > value prior to this point. Is there any way to do this? Thanks in advance.
> > Regards.
>
> An "If" statement comes to mind as in:
>
>     If item = value Then
>         ' do something
>     End If
>
> Perhaps a more detailed description of the issue would suggest a different
> answer.
>
> What do you mean by "stop execution of the code"?
>
> Will this require user interaction?
>
>
>
Author
9 Mar 2005 8:28 PM
McKirahan
Show quote
"Jack" <J***@discussions.microsoft.com> wrote in message
news:F253B327-7092-4EF7-AF57-5967CAF26849@microsoft.com...
> Thanks McKirahan for your answer. Actually, I need to log into the system.
> That is the only user interaction. I would like to check couple of values
of
> variables which are in the middle of the code. Just after this, the code
is
> giving error. I was wondering if I could open the web page and the code
would
> run upto this point of extracting the values of couple of variables and
not
> execute any further which, at this point, if runs, will give me error in
the
> page. Hope I am clear.
> I am going to test Vic's suggestion, to see if that works. Regards.

Use
    Response.Write(variable_name)
before
    Response.End
to view variable_name at the point of termination

If you use it multiple times. use:
    Response.Write("<br>variable_name = " & variable_name)
Author
9 Mar 2005 8:59 PM
Jack
Thanks for your input McKirahan. Regards.

Show quote
"McKirahan" wrote:

> "Jack" <J***@discussions.microsoft.com> wrote in message
> news:F253B327-7092-4EF7-AF57-5967CAF26849@microsoft.com...
> > Thanks McKirahan for your answer. Actually, I need to log into the system.
> > That is the only user interaction. I would like to check couple of values
> of
> > variables which are in the middle of the code. Just after this, the code
> is
> > giving error. I was wondering if I could open the web page and the code
> would
> > run upto this point of extracting the values of couple of variables and
> not
> > execute any further which, at this point, if runs, will give me error in
> the
> > page. Hope I am clear.
> > I am going to test Vic's suggestion, to see if that works. Regards.
>
> Use
>     Response.Write(variable_name)
> before
>     Response.End
> to view variable_name at the point of termination
>
> If you use it multiple times. use:
>     Response.Write("<br>variable_name = " & variable_name)
>
>
>
Author
9 Mar 2005 6:51 PM
Vic Sowers
"Jack" <J***@discussions.microsoft.com> wrote in message
news:3F08ABE0-7976-4FEA-9BDA-2D8165E76DA1@microsoft.com...
> Hi,
> I have a asp page which is pretty long. This consitst of various
> recordsets.
> My intention is to stop execution of a code at a cetain point and test one
> value prior to this point. Is there any way to do this? Thanks in advance.
> Regards.

Try:
    Response.End();
after you've completed testing the value.

AddThis Social Bookmark Button