View Single Post
Old 08-05-2004, 06:37 AM   #4 (permalink)
cartmen34
Psycho
 
Location: the hills of aquafina.
Quote:
Originally posted by Stompy
What's up with this?

Say you breakpoint a line and have some code underneath that inserts a few records into a table in a database.

Lines go somewhat like this:

init variables
open db connection
insert records
close db connection

If you breakpoint on the init variables part and step through the code and realize "oh, I just spotted an error in my code" and hit stop, all the code beyond that is still executed, or in this case, records will be inserted into the table.

Why does it do this? Isn't that potentially dangerous in the sense that even though you spotted the error and hit stop, your code will still follow through?

Basically it kinda sucks for me right now because I need to run this app and breakpoint it to see how data will look before going in, but in order to prevent it from actually executing the SP, I have to rename it on the server so when it's called, it errors out.
I've been writing apps similar to what your describing for about a year now with VB.NET, and I've never experienced what you are describing. When I stop the exe, especially at a breakpoint, the code stops...nothing more, nothing less.
__________________
"The problem with quick and dirty, as some people have said, is that the dirty remains long after the quick has been forgotten" - Steve McConnell
cartmen34 is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73