internal void ProcessErrors(DataSet ds, XmlReader ssync)
{
DataTable table;
int iSsyncDepth = ssync.Depth;
ssync.Read(); // pass the before node.
while (iSsyncDepth < ssync.Depth)
{
table = ds.Tables.GetTable(XmlConvert.DecodeName(ssync.LocalName), ssync.NamespaceURI);
if (table == null)
throw ExceptionBuilder.DiffgramMissingSQL();
string diffId = ssync.GetAttribute(Keywords.DIFFID, Keywords.DFFNS);
DataRow row = (DataRow)table.RowDiffId[diffId];
string rowError = ssync.GetAttribute(Keywords.MSD_ERROR, Keywords.DFFNS);
if (rowError != null)
row.RowError = rowError;
int iRowDepth = ssync.Depth;
ssync.Read(); // we may be inside a column
while (iRowDepth < ssync.Depth)
{
if (XmlNodeType.Element == ssync.NodeType)
{
DataColumn col = table.Columns[XmlConvert.DecodeName(ssync.LocalName), ssync.NamespaceURI];
//if (col == null)
// throw exception here
string colError = ssync.GetAttribute(Keywords.MSD_ERROR, Keywords.DFFNS);
row.SetColumnError(col, colError);
}
ssync.Read();
}
while ((ssync.NodeType == XmlNodeType.EndElement) && (iSsyncDepth < ssync.Depth))
ssync.Read();
}
return;
}