How do I get Visual Studio 2010 to update my DataSet after updating the database?

I added new columns to the existing MS Access 2010 , which I connected to Visual Studio 2010 . After updating the database, the data source window and DataSet have no new columns. I looked at such answers: Visual Studio DataSet Designer Refresh Tables , but configured the default query using "SELECT * FROM Reservations" (where it was suggested to update the query will result in the table being updated) did not update anything. And the built-in "Refresh" buttons in the Data Sources and Database Explorer windows have not yet caught updates (there is also a new table that I would like to work with in the near future).

How can I (non-software) update my DataSet? I have custom bindings and you don’t want to manually recreate them, deleting this data source and β€œre-adding” it. I would prefer to add some custom bindings for my new fields and continue to work on this project!

+4
source share
1 answer

Mina turns out to be close to a duplicate question ... See this for an answer (and yes, it's as simple as going through the TableAdapter configuration in the DataSet constructor.)

Refresh the DataSet structure in Visual Studio to match the 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 understood it, after I almost lost my mind, I was actually one subfolder (this means that there are two copies of the database in my project folder). Projects β†’ MyProject β†’ db.accdb, and Projects β†’ MyProject β†’ MyProject β†’ db.accdb. If you have this problem and the request does not work, look VERY carefully at the path. VERY CLOSE.:)

+1
source

Source: https://habr.com/ru/post/1484869/


All Articles