code continues after stop debugging

E

ENathan

I have a public sub in a class that does something like:

If ValuesChanged() Then
UpdateDatabase
End If

ValuesChanged and UpdateDatabase are Private functions within the class.

My problem is, when I finish debugging ValuesChanged and click the stop
debugging button, it appears the code continues behind these scenes and runs
UpdateDatabase.

Why doesn't it stop or how can I get it to stop? TIAFYT
 
G

Guest

It should not unless you have already fired off the command in SQL Server. If
so, stopping debugging only stops the client, as it does not contact the
server, at all. At this point, the code is still running (on the server)
despite you stopping it (on the client). You have to break before you contact
the server to stop server code.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
C

Craig Deelsnyder

ENathan said:
I have a public sub in a class that does something like:

If ValuesChanged() Then
UpdateDatabase
End If

ValuesChanged and UpdateDatabase are Private functions within the class.

My problem is, when I finish debugging ValuesChanged and click the stop
debugging button, it appears the code continues behind these scenes and runs
UpdateDatabase.

Why doesn't it stop or how can I get it to stop? TIAFYT

I believe 'Stopping' debugging means you're just detaching from the
process, not stopping the request. VS.NET is then releasing it's lock
on the process and the request continues on the server.

I've never tried before, but try entering the following command in the
Command Window before hitting Stop:

Response.End()
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top