tabletableadapter is not a member of... tableadaptermanager

theboss

New member
Joined
May 16, 2011
Messages
1
Programming Experience
10+
First, I'm not sure this is the best forum for this question, so I apologize if it is not.

I have an existing dataset with a functioning tableadapter. I added a new column to the database table and now want that column exposed in the dataset and its tableadapter. As soon as I add the column to the dataset, click Finish, and Save the changes, I get an error "SampleTableAdapter" is not a member of "...dsSampleTableAdapters.TableAdapterManager". I can preview data successfully. I've compared Properties to other datasets where I am not having this issue but cannot find anything incorrect (as far as I know, as I have limited experience in this area). One thing I noticed is the dataset is generated from four tables using inner and outer joins. Just a hunch, but could this be causing an issue. Thanks in advance for any feedback.
 
You should not edit the DataSet by hand unless you specifically want to do something different to what's in the database. If you make changes in the database and you want those changes reflected in the DataSet, you should use the same configuration wizard that you used to create the DataSet in the first place. In the Data Sources window, there is a button on the tool bar that will run the configuration wizard again.
 
I've had problems with tableadapters that had columns from various joined tables. It seems ADO.NET likes things hierarchical more than relational (Hierarchical database model - Wikipedia, the free encyclopedia).

But anyway, the purpose of the TableAdapterManager is to manage multi-table updates automatically. If you have, for example, tables Customers, Orders, and OrderDetails in your dataset, it's possible that you accumulate changes to all three. It's also possible that certain values have changed in such a way that you could violate relational integrity unless you updated the tables in a certain order. That's what the TableAdapterManager tries to do.

However, your SampleTableAdapter can't be updated anyway because it doesn't correspond to a specific table in the database. Like you say, the table adapter is based on several joined tables. So you'd think it would be ok that your table adapter isn't a member of the table adapter manager. It's not supposed to be. It's not a table the table manager will be managing. Why the error? I don't know.

But try this. Open the dataset in the designer, and look at the properties for the dataset itself. Change Hierarchical Update from True to False, and see if the error goes away. Then turn it back on and see if the error remains away. Do you need a table adapter manager in any case? If not, leave it false. Let us know how it goes.
 
Back
Top