Reputation: 137
I have made a database and created a table with five fields and used add new datasource and added a new dataset by using that. And I have made a form and inserted all fields by dragging them into the form and changed lots of the properties. Now I need to add a new field into the table in database. Do I have to create a new datasource and a new dataset and do everything from beginning or there is a way to update the datasource and dataset so that the new field automatically appears in them? Any answer would be appreciated.
Upvotes: 3
Views: 12531
Reputation: 7558
As you can read here you should right-click the TableAdapter in the Dataset Designer and click 'Configure' the TableAdapter Configuration Wizard opens where you can reconfigure the main query that defines the schema of your table. This should leave the additional TableAdapter queries (the additional methods) that were added after initial configuration.
So follow these steps
Fill,GetData
-> ConfigureQuery builder
and add the new column in the query statmentok
and then your dataset is updated with the new database structureIf it doesn't work try deleting the dataTable and drag your table from Server Explorer again in your xsd file
Upvotes: 5