After creating a datasource and generating a dataset, my database has changed.
How can I "refresh" the dataset so it sees these changes.

One Method I have been able to do is delete the .xsd file from soultion explorer. There go my modified queries & code.

Another method tried was to re-drag/drop the table from Server Explorer to the DataSet design surface. However, it creates another instance of the table.
For example, if my table is named tbl_test, when I drop re-drop tbl_test on the surface, I now have another table talled tbl_test1

I don't want to delete the original tbl_test first, as I have modified the queries and code for it.

Am I missing something?

Is there a better way?

Thanks

Recommended Answers

All 3 Replies

Right click on the table adapter and configure the queries. Step through the wizard and let it pull down the new results and it will adjust the dataset for you accordingly. If you added new columns but don't have the new columns in your SELECT statement then obviously it will not be aware of the schema changes and the new data won't be pulled in.

OK, I tested that and it did "see" newly added columns.
However, any customizations I made to the queries previously would be lost. I guess there is now way around that.

Thanks for your quick reply.

No, there is no way around that. This is one of the many reasons why I don't use datasets :)

Please mark this thread as solved if I have answered your question and good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.