Hi
When i add a datacolumn to a dataset and then call Update on the dataset
then my MS Access datbase does not reflect the changes.(no coumn was added
to the table)
DataColumn newcolumn = new DataColumn("NewlyAdded",
System.Type.GetType("System.Int32"));
string mySelectQuery = "SELECT * FROM mytable";
DataSet mds = new DataSet();
OleDbDataAdapter mda = new OleDbDataAdapter(mySelectQuery, dbconnection);
mda.Fill(mds,"mytable");
mds.Tables["mytable"].Columns.Add(newcolumn);
mds.Tables["mytable"].AcceptChanges();
mds.Update(mdt2, "mytable");
dbconnection.Close();
What am i missing ?
|