Setting object = nothing after Response.end

D

dotnettester

Woud this work?


.....
Response.end

set objConn = nothing
set objAnyObject = nothing

?
 
D

Dave Anderson

dotnettester said:
Woud this work?


....
Response.end

set objConn = nothing
set objAnyObject = nothing

RTM.
http://msdn.microsoft.com/library/en-us/iissdk/html/268f7aa3-b4a2-41d9-9d2a-34c02bec44cf.asp



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
D

Dave Anderson

Patrice said:
Try :

Response.Write "Hello"
Response.End
Response.Write "World !"

To be fair to the OP, it seems reasonable to assume that once you call the
End method of the Response object, the Write method of the same should no
longer be available. So, perhaps this is not the best example with which to
test this principle.

It seems less reasonable to assume that the rest of the process ends also,
by my reckoning. Is it obvious, for example, whether the Nothing assignment
happens here?

Response.Redirect myURL
Set cn = Nothing

The MS documentation says nothing about the process scope -- it only
describes what is sent to the browser:
http://msdn.microsoft.com/library/en-us/iissdk/html/01d1962f-0d45-4a5b-a46c-1b7f38f37ab3.asp

Of course, if you can get to the Response.Redirect documentation, you can
get to that of Response.End, so this point is somewhat moot. But even to
someone with the intuitive understanding that Response.Redirect sends an
HTTP 302 header, it is not patently clear that the *process* stops when the
Response Object stops doing stuff.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
P

Patrice

Good point then use whatever would have a "visible" effect (writing in a
trace file ?).

My original unexplicit point was that it seems the kind of question that is
quite easily answered by yourself - apparently not easily enough for me
though, shooting myself in the foot ;-)
 
D

Dave Anderson

Patrice said:
Good point then use whatever would have a "visible" effect
(writing in a trace file ?).

That's the kind of thing I was thinking.

Of course, it would be an academic exercise, having resolved the question by
reading the documentation.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top