Vb net dataset not updating
By opening the Data Set and selecting the Cust Id column, you will see that it has the following properties: The Auto Increment property corresponds to the Identity property in the database.Auto Increment Seed corresponds to Identity Seed, and Auto Increment Step to Identity Increment.The user can then select a table from the combobox and I then populate the datagridview on the form with the contents of the selected table.The issue I am having is that the first time through the datagridview shows all of the contents of the selected table without a problem.Data Source = Get Data Set For Table("Table Name"); This will set and update the new tables within the bs Object. However, I have tried your solution and replaced my datatable with a dataset and, with a minor tweaks, it seems to be working pretty well right now. Datasource = null before setting it back to the filled dataset for use with my datagridview.
So, the next table that I get from the database simply 'appends' to the datatable the new columns and my datagridview shows nothing but all of the column headings for every table that I select from the database.I found a work around online using the dt.columns.clear() and clear() methods to clear out the datatable instead of the dt.reset().This seems to work just fine but it seems like a really terrible way to handle this.Below is a listing of my code for the combobox selected Index Changed event which I use, essentially, to repopulate the datagridview.private void cb Table Select_Selected Inde My problem is that the datatable shema is constantly changing based on what table is selected from the database (they all have different columns and, of course, rows associated with them).