myAdapter = new MySqlDataAdapter(); myAdapter.InsertCommand = new MySqlCommand(myQuery, myCon); myData = new DataSet(); myAdapter.Fill(myData, "myTable");
When you create a new row or modify a row the changes it inflicts are reflected to its underlying source (a datatable or dataset). So to send the changes or get the changes you could see the underlying source. To send updates to the database you could use a DataAdapter.Update command...
[C#]need help to write in database the datagridview rows text
jasms
Im still having trouble.
I try in the follow way:
myAdapter = new MySqlDataAdapter();
myAdapter.InsertCommand = new MySqlCommand(myQuery, myCon);
myData = new DataSet();
myAdapter.Fill(myData, "myTable");
myGrid.DataSource = myData;
myGrid.DataMember = "myTable"
myParam = new MySqlParameter();
myParam = myAdapter.InsertCommand.Parameters.Add("@myVariable", MySqlDbType.VarChar);
myParam.SourceColumn = "myColumn";
myParam.SourceVersion = DataRowVersion.Current;
myAdapter.Update(myData, "myTable");
in this case, my insert query is;
string myQuery = "INSERT INTO myTable (myColumn) VALUES(@myColumn)";
so.....after all...still doesnt work :(
jefseyen
Hi,
When you create a new row or modify a row the changes it inflicts are reflected to its underlying source (a datatable or dataset). So to send the changes or get the changes you could see the underlying source. To send updates to the database you could use a DataAdapter.Update command...
cheers,
Paul June A. Domag
vidya narayanan
Only needed to assign a column index at "@MyColumn" and it worked.
Brak59
so....which is the value of "@myColumn"