Updating Database From Dataset?
Posted
by Ases
on Stack Overflow
See other posts from Stack Overflow
or by Ases
Published on 2010-04-20T19:35:52Z
Indexed on
2010/04/20
19:43 UTC
Read the original article
Hit count: 197
I wanna update my database from my dataset.
mydataadapter = new MySqlDataAdapter("SELECT * FROM table0; SELECT * FROM table1; SELECT * FROM table2;", con);
myda.Fill(dataset);
//......
// for example I'm doing a change like this
ds.Tables[2].Rows[1][3] = "S";
//Then updating the database
MySqlCommandBuilder com = new MySqlCommandBuilder(mydataadapter);
mydataadapter.Update(dataset, "table2");
then it returns this error
TableMapping['table2'] or DataTable 'table2' didn't find by Update.
Do you have any advice?
© Stack Overflow or respective owner