VB .NET changing my code!!

  • Thread starter Thread starter jy836
  • Start date Start date
J

jy836

I was using VB .NET, working on my database application. After running it
successfully, I decided to take a little break. So I closed Visual Studio (I
saved all files, of course), and when I opened my solution later, the
application had several bugs which hadn't been there earlier.

I had to manually look through the code to figure out what had been changed
and fix the problems. It wasn't a lot of work, but I'm concerned that if VS
..NET does this in the future (when my application is farther along and has
much more code), it could have serious consequences. (I haven't tested the
application as thoroughly as I would have liked to after fixing the code, so
there may still be existing bugs that I don't yet know about.)

Has anyone else had this problem? Is there some kind of patch from MS that I
can download for this?
 
jy836 said:
I was using VB .NET, working on my database application. After running it
successfully, I decided to take a little break. So I closed Visual Studio (I
saved all files, of course), and when I opened my solution later, the
application had several bugs which hadn't been there earlier.

What were the bugs?

Has anyone else had this problem? Is there some kind of patch from MS that I
can download for this?

Nope.

~
Jeremy
 
You must have some problem that does not meet the eye. Our team has several
years of combined usage of VB.NET, both releases, on very large projects.
We have never experienced problems with VS losing, changing, or inserting
code. Per chance, are you using SourceSafe and possibly done a Get and
overwrote changes?

http://www.knowdotnet.com
 
jy836 said:
I was using VB .NET, working on my database application. After
running it successfully, I decided to take a little break. So I
closed Visual Studio (I saved all files, of course), and when I
opened my solution later, the application had several bugs which
hadn't been there earlier.

FMI: Which kind of bugs?
 
Yeah, VB puts bugs in my code all the time, but my boss doesn't believe
me...

But seriously, can you give some examples of the code that was changed?
Were you modifying stuff in the region marked "Windows Form Designer
generated code"? Because I think that VB.NET changes stuff in there all the
time. I've also worked on a large VB.NET project and have not had any
problems with code mysteriously changing behind my back.

- Don
 
I was using VB .NET, working on my database application. After running
it

There is an option in the IDE menu - Tools \ Introduce random bugs. Uncheck
it and it will come back to normal.
:-)

More details, please.

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
 
;-)
Blumidoo said:
There is an option in the IDE menu - Tools \ Introduce random bugs. Uncheck
it and it will come back to normal.
:-)

More details, please.

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
 
Don said:
Yeah, VB puts bugs in my code all the time, but my boss doesn't believe
me...

But seriously, can you give some examples of the code that was changed?
Were you modifying stuff in the region marked "Windows Form Designer
generated code"? Because I think that VB.NET changes stuff in there all the
time. I've also worked on a large VB.NET project and have not had any
problems with code mysteriously changing behind my back.

I had code like this:

IDNum1 = TB1.Text

......(next line was in a different procedure).....

OleDbDataAdapter2.SelectCommand.Parameters("IDNum").Value = IDNum1

Later, I moved the "IDNum1 = TB1.Text" line elsewhere in code (which
shouldn't cause other code to change automatically, right?), saved the
application, and closed it. When I opened it later, the second line of code
appeared like this:

OleDbDataAdapter2.SelectCommand.Parameters("IDNum").Value = TB1.Text

The problem is that TB1.Text no longer had the same value as it did at the
"IDNum1 = TB1.Text" line, so the command was useless.

Also, in what appears to be a completely unrelated issue, a button which I
had set at design time to be disabled is now enabled. I don't understand
what's going on; is there an option or customization that I should change?
 
Sounds like a mousing issue. You mentioned that the last thing you did was
move something (ie cut & paste), it is possible that you
accidentally made a mouse click/scroll combination that rearranged some
text. I do this every now and then with my scrolling trackball.
Mouse movements, mouse clicks and mouse scrolls are all buffered.
If not that, then make sure you are not screwing around with automagically
generated code.
 
Back
Top