After downloading the beta framework and disassembling the code, I was able
to see that the batch handling was done by creating a semicolon delimited
query strings executed using sp_executesql. Initially I thought under the
hood, it's using XML through updategram/diffgrams or other techniques.
Thanks a lot guys.
private void BuildCommandTextCall(string cmdTxt, DbParameter cmdTextParam,
DbParameter cmdParamDef, DbParameter[] parameters)
{
this._commandText.Append("exec sp_executesql
").Append(cmdTextParam.ParameterName);
if ((parameters == null) || (0 >= parameters.Length))
{
return;
}
string text1 = ", ";
this._commandText.Append(text1).Append(cmdParamDef.ParameterName);
for (int num1 = 0; num1 < parameters.Length; num1++)
{
this._commandText.Append(text1).Append(parameters[num1].ParameterName);
}
this._commandText.Append(";");
}
Ah, Greg, the DataSet is not stored as XML under the hood. The DataTable
is
a block of arrays and the DataSet is simply a pointer to the DataTable
objects. ADO only converts the data into XML on demand.
The idea behind batch updates (as was supported in ADO classic) is to
reduce
(or eliminate) needless round trips. It uses an expanded paradigm to deal
with exceptions that occur and the events that have to fire before and
after
the operations take place.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
"Cowboy (Gregory A. Beamer) - MVP"