Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Debugging and datetime parameter modification

Author  Topic 

IceDread
Yak Posting Veteran

66 Posts

Posted - 2007-11-23 : 08:36:09
Hi

I'm wondering about datetimes modification while debugging. I've a backup of a db debugging searching for some answeres. Problem is I have to asume it's one month back in time, so when I get the value from some date functions, if I after that modify the date value displayed for the parameters (debugging with vs pro 2005) will it be my modified values that it uses when those variables are used? It seams like it, but I'd like to be 100% sure.

Thanks

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-11-23 : 08:42:08
You can set dates to whatever you want, please post your code if you want a definite answer though.
Go to Top of Page

IceDread
Yak Posting Veteran

66 Posts

Posted - 2007-11-23 : 08:49:38
It's not a question about my code thou, in vs 2005 debugging, the parameters values are displayed while i step throu stored procedures etc and debugger lets me change them actually. Q is if the displayed value of a parameter in debugging with vs 2005 reads the changed value or the value it was before I changed it. And like I said it seams to read the changed value that is displayed but I want to know for sure if that is how debugging in vs 2005 always works.
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-11-23 : 11:50:21
The debugger is always using whatever value is displayed in the watch window, that will only change if the code you're running changes it.
Go to Top of Page

IceDread
Yak Posting Veteran

66 Posts

Posted - 2007-11-26 : 04:07:37
So what if I change the values while debugging that are displayed, it seams to use the values that I changed them into but I want to be sure if it's always so. Thanks.
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-11-26 : 20:38:25
Like I said, if you change the values they will be used as long as that session is running AND as long as the code doesn't change them. Obviously if you have a SET statement in a stored procedure and that SET runs after you change a value, then the SET will change it again.
Go to Top of Page
   

- Advertisement -