I'm writing a routine that does some cleanup whenever it senses a change in
the date. The only way to test my code is to set the date back to
yesterday at 11:59pm and observe the change as it occurs.
I did so, and noticed an error. So I altered my code to allow for the
error and rolled the clock back a minute or two, so that it was back to
11:59 yesterday. The same behavior occured.
So I put a MsgBox in the routine to alert me to what the value was for a
couple of variables, and I re-ran the app. The MsgBox never ran.
I moved the MsgBox to the very beginning of the routine. Still it wouldn't
fire.
I moved the MsgBox to the first line of the button event that fires the
routine. Still the MsgBox wouldn't fire.
I removed the MsgBox line, and added Exit Sub to the very beginning of the
button event. The button still called the routine.
I removed the Exit Sub line, and added MsgBox("loaded") to Form_Load. The
MsgBox never fired.
I reset the time to the current time and compiled, and everything worked
fine.
It seems as though .NET has some safeguard to keep you from compiling over
a newer version with an older version. Am I correct in this assumption?
Tony K - 07 Mar 2008 22:24 GMT
Maybe try doing a Clean then Rebuild??
Tony K.
> I'm writing a routine that does some cleanup whenever it senses a change
> in
[quoted text clipped - 26 lines]
> It seems as though .NET has some safeguard to keep you from compiling over
> a newer version with an older version. Am I correct in this assumption?
Just_a_fan@home.net - 15 Mar 2008 00:36 GMT
Changing the clock time is dangerous and I would never recommend it.
Try just putting a checkbox on your form and whenever you click it,
trigger the cleanup.
Waiting for midnight is a pain. You only get one test per day. Canging
the clock is dangerous, too.
Try triggering the cleanup some other way if at all possible.
Mike
On Fri, 07 Mar 2008 09:50:32 -0800, in
microsoft.public.dotnet.languages.vb Scott McNair
<smcnair@beachexpress.takethispartout.com> wrote:
>I'm writing a routine that does some cleanup whenever it senses a change in
>the date. The only way to test my code is to set the date back to
[quoted text clipped - 24 lines]
>It seems as though .NET has some safeguard to keep you from compiling over
>a newer version with an older version. Am I correct in this assumption?