VS 2005 Woes - Lost program code.


Apr 10, 2006
Toronto Canada
Programming Experience
A tip to those with a need to delete a Datatable from a Dataset.
Backup your program before you do it.

Background: I am working with an application imported from VS 2002 into VS 2005.

When I deleted a Datatable from a Dataset, all the code I wrote in
the past 3 days including the designed form are gone. Only a few commented statements were left.

How it happened: I was trying to delete a column from a datatable because this column name no longer exist. This column name (seq_nbr AS [Seq No.]) was an alias of a SQL Database column which was generating a non-CLS compliant name. I changed the alias (seq_nbr AS [Seq No]) and re-generated the Datatable but now I have the 2 column name aliases. I can't delete the original because it is a Primary Key (even though it no longer exist). So I deleted the entire table with the intent of re-generating the entire table into the dataset. Wow, now my form can no longer be loaded and I am told to put back the changes I made to the forms designer. Looking at my program (Notepad), the only thing left was some
commented statements. I looked everywhere hoping to find any remnants of my code and I came up empty handed. I wound up re-designing the form and re-writing the code. Fortunately, I can still display from my old VS 2002 backup but all the code I wrote in VS 2005 are gone. By the way, the datatable I deleted was bound to a DataGrid and maybe that has something to do with it, but still, I should not lose my work by what I did.

When I closed the IDE, I replied "NO" to saving my changes but the unshakeable error remains.

Has anyone out there experienced this situation or is it just me? Moderator - Any word of advice?

I will share more of my VS 2005 stories (there are more) when I find time to write.

Latest posts

Top Bottom