I created a dataset from an access db and developed app. Database structure changed- how can i update my dataset w/o starting from scratch?

I developed an application around a simple Access database.  Then, one of the database table names changed.  

How do I go about updating the dataset classes and table adapters i'm using through out my code?

Could someone point me in the right direction for how you're supposed to go about updating the "dataSet" classes that were automatically generated for me using the Visual Studio Data Source.

I attempted to change all the strings i could find of the `OldTableName` with the `NewTableName` in the dataset.designer.cs files (which is technically a no no since it's an auto generated file) but i still get Ole exceptions stating the old table name cannot be found.

The tableAdapter's aren't updated when a table name is changed... is what i've gathered.  Is there any type of refactoring support?  

Perhaps there is a way of making some type of alias table name in MS Access?
blak3rAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

p_davisCommented:
did you do a search of the entire solution with the oldtablename?
0
blak3rAuthor Commented:
Yes.

The files i was updating were automatically generated files.  
So, i think they may be regenerated when i rebuild.
0
blak3rAuthor Commented:
I never found an ideal solution.  What i ended up doing is manually keeping them in sync.

I found that if you right click on the dataset designer and Add a new TableAdapter you can right a SQL query that will connect to your database and create a complete Dataset+TableAdapter for your new column (it recognizes relations and everything).

For example if you added a new Table called Products

Add new TableAdapter, Specifying the Connection string to your database, Select Multiple rows, then add the following SQL:

<code>
SELECT *
FROM Products
</code>

The rest is self explanatory.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.