I made a ListBox with your standard smart-control thing, and have it connected to a database. It gets the data I’ve pre-generated in there via query builder, so when I do this:
this.calibrate_swipesTableAdapter.Fill(this.xperdex_crandallDataSet.calibrate_swipes);
I get a listbox with my data.
THEN, when I add a chunk of data to it, via this:
toadd["card_number"] = card_number;
this.xperdex_crandallDataSet.Tables["calibrate_swipes"].Rows.Add(toadd);
It also works. It works great. Now, when I close, I lose all my information. Update my adapter and AcceptChanges, right?
Not so fast. When I call
this.calibrate_swipesTableAdapter.Update(this.xperdex_crandallDataSet.calibrate_swipes);
I get “does not contain a definition for ‘update'”.
What gives? I don’t see any reason why the same thing that does the filling, wouldn’t have an update method.
You may want to take a look at TableAdapter Overview which states:
You have two choices:
To change the UpdateCommand, find out what’s the name of the class generated for the TableAdapter. The code should look something like the following:
UPDATE:
As commenters said, there are other conditions for which the commands may not be generated. See the comments.