How do I get Visual Studio 2010 to refresh my DataSet after I have updated the Database source?

35,099

Mine turns out to be close to a duplicate question... See this for the answer (and yes, it is as simple as going through the TableAdapter configuration under the DataSet designer.)

Update DataSet structure in Visual Studio to match new SQL Database Structure

Also, see: http://msdn.microsoft.com/en-us/library/ms171902%28VS.80%29.aspx (How to edit TableAdapters)

... and, as I figured out after nearly losing my mind, I was actually one sub-folder off (meaning there were two copies of the database in my project folder). Projects -> MyProject -> db.accdb, and Projects -> MyProject -> MyProject -> db.accdb. If you're having this issue and querying is NOT working, look VERY closely at the path. VERY CLOSELY. :)

Share:
35,099
armadadrive
Author by

armadadrive

Hobbyist programmer, marketer, musician, sound-engineer, writer, husband, father.

Updated on March 02, 2021

Comments

  • armadadrive
    armadadrive about 3 years

    I have added new columns to an existing MS Access 2010 Database that I have hooked into Visual Studio 2010. After updating the Database, the Data Source window and DataSet do not have the new columns. I looked at answers such as this: Visual Studio DataSet Designer Refresh Tables , but configuring the default query with "SELECT * FROM Reservations" (where it has been suggested that updating the query will cause the table to refresh) hasn't refreshed anything. And the built-in "Refresh" buttons on the Data Sources and Database Explorer windows haven't caught the updates yet (there is also a new table I would like to work with shortly).

    How the heck do I (non-programatically) update my DataSet? I have custom bindings and do not want to have to manually re-create those by removing this data source and 're-adding' it. I would rather add some custom bindings for my new fields and keep on working away at this project!