DataSets & TableAdapters
-
I've never used the datasets and tableadapters in visual studio before and I'm having some trouble trying to figure them out. Right now it's going like this. I have a strongly-typed dataset on my form, I also have a bindingsource that's bound to the dataset and my database table, this created a tableadpater for me. Now because some columns in the database are just id's that the user doesn't need to know about I don't have controls for them on my form. My question is how to I update this information in the dataset so that it's populated back to the database? I'm trying something like this, but I know it's not right.
Guid guid = Guid.NewGuid ();
myDataSet.myDataTable table = myTableAdapter.GetData ();
table.idColumn = guid.ToString ("N"); // the "id" column is of type uniqueidentifier
myBindingSource.EndEdit ();
myTableAdapter.Update (this.myDataSet.eps);I think the basic question is how to I update/insert/delete on a strongly-typed datatable from within code? I know this isn't the C# forum, but I'm not getting any answers there. If you want to give me some solutions or help in C++ I'm fine with converting it over. Thanks for any and all help. - Aaron