S
Sahil Malik
Okay so one of the two overloads of DbDataAdapter.Update,
Update(DataSet)
Update(DataSet,sourceTable)
What exactly do these do?
Per the documentation the first will call the various commands on each row
in the dataset (#1), and each row in the specified datatable (#2).
Funny though, in reality the first overload ends up calling only the various
commands on the VERY FIRST table in the DataAdapter. I was very surprised to
see this. This has been confirmed by reflected code --
public override int Update(DataSet dataSet)
{
return this.Update(dataSet, "Table");
}
Now needless to say that is QUITE pathetic for two reasons.a) The
documentation is incorrect.b) I can't do a hierarchical update using
SqlDataAdapter.Update? C'mon !!!Can anyone tell me then if there is any way
at all I can use SqlDataAdapter.Update(DataSet) to persist *hierarchical*
changes? (Don't say use SqlXml or execute commands directly, because I know
that answer)- Sahil Malikhttp://codebetter.com/blogs/sahil.malik/
Update(DataSet)
Update(DataSet,sourceTable)
What exactly do these do?
Per the documentation the first will call the various commands on each row
in the dataset (#1), and each row in the specified datatable (#2).
Funny though, in reality the first overload ends up calling only the various
commands on the VERY FIRST table in the DataAdapter. I was very surprised to
see this. This has been confirmed by reflected code --
public override int Update(DataSet dataSet)
{
return this.Update(dataSet, "Table");
}
Now needless to say that is QUITE pathetic for two reasons.a) The
documentation is incorrect.b) I can't do a hierarchical update using
SqlDataAdapter.Update? C'mon !!!Can anyone tell me then if there is any way
at all I can use SqlDataAdapter.Update(DataSet) to persist *hierarchical*
changes? (Don't say use SqlXml or execute commands directly, because I know
that answer)- Sahil Malikhttp://codebetter.com/blogs/sahil.malik/