Well, this may look an stupid question but I've been pulling my hair out all morning with this.
In my VS 2005 project, i've already created a fully working DataSet with a lot of DataTables. Due to new requirements in the project I need to create a few new DataTables into my DataSet. Once created, i'm facing a problem i've never seen before. I'm unable to use the new DataTable into the existing DataSet.
Dim ds as new ExistingDataSet
I can use the already created old data structure
ds.ExistingTable.ExistingColumn 'No problems
But when I try to use the new created DataTable with ds.NewDataTable.NewColumn
VS shows an error: NewTable is not a member of ExistingDataSet
I have checked that my new DataTable and its own columns appears at Data Sources window, tried to clean and rebuild the project and so on... The funny thing is that in order to isolate the problem (which i think resides somewhere into the DataSet designer definition) i've done a test, just creating a new DataSet with a new DataTable. This way i can use it without problems
Dim dsTest as New DataSetTEST
dsTest.DataTable1.Column1
I know i could create a new DataSet with the same structure as the old one plus the new datatable, and replace the old non-working dataset with this new one, but my old Dataset is already linked with some reports and I'd like to use my existing dataset with my new data and avoid having to replace all the data links again.
There is a subtle (and long-standing) bug in VS that under certain circs it seems to lose sync between the designer and the generated code for datasets. Try rt-clicking the .xsd file in the solution explorer and select 'properties'. Make sure Custom Tool is set to MSDataSetGenerator.