F
fermisoft
How to set the command text for the following update operation?
DataTable dataTable = (DataTable) grid2Stock.DataSource;
dataTable = dataTable.GetChanges();
if (dataTable!=null)
{
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.UpdateCommand = new OleDbCommand();
conn.Open();
adapter.UpdateCommand.Connection = conn;
/************* How to set this update command text????
******************/
adapter.UpdateCommand.CommandText = "";
if (conn.State==ConnectionState.Open)
{
adapter.Update(dataTable);
}
}
DataTable dataTable = (DataTable) grid2Stock.DataSource;
dataTable = dataTable.GetChanges();
if (dataTable!=null)
{
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.UpdateCommand = new OleDbCommand();
conn.Open();
adapter.UpdateCommand.Connection = conn;
/************* How to set this update command text????
******************/
adapter.UpdateCommand.CommandText = "";
if (conn.State==ConnectionState.Open)
{
adapter.Update(dataTable);
}
}