S
sweetpotatop
Hi,
I am using the following to update some rows in a dataset, I wonder
why the data is no updated in the SQL table. Am I missing anything?
Please advice, your help would be greatly appreciated.
commandTimeoutPeriod = 120;
typeCommand = CommandType.Text;
command.CommandText = commandExecution;
command.Connection = connection;
command.CommandTimeout = commandTimeoutPeriod;
command.CommandType = typeCommand;
SqlDataAdapter adapter = null;
// initialize the adapter and dataset
adapter = new SqlDataAdapter(command);
if( ds == null) ds = new DataSet();
adapter.Fill(ds);
TestData = ds.Tables[ 0 ];
foreach(DataRow record in TestData.Rows)
{
row["field"] = YES_FLAG;
}
I am using the following to update some rows in a dataset, I wonder
why the data is no updated in the SQL table. Am I missing anything?
Please advice, your help would be greatly appreciated.
commandTimeoutPeriod = 120;
typeCommand = CommandType.Text;
command.CommandText = commandExecution;
command.Connection = connection;
command.CommandTimeout = commandTimeoutPeriod;
command.CommandType = typeCommand;
SqlDataAdapter adapter = null;
// initialize the adapter and dataset
adapter = new SqlDataAdapter(command);
if( ds == null) ds = new DataSet();
adapter.Fill(ds);
TestData = ds.Tables[ 0 ];
foreach(DataRow record in TestData.Rows)
{
row["field"] = YES_FLAG;
}