internal void ProcessErrors(ArrayList dt, XmlReader ssync)
{
DataTable table;
int iSsyncDepth = ssync.Depth;
ssync.Read(); // pass the before node.
while (iSsyncDepth < ssync.Depth)
{
table = 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];
if (row == null)
{
for (int i = 0; i < dt.Count; i++)
{
row = (DataRow)((DataTable)dt[i]).RowDiffId[diffId];
if (row != null)
{
table = row.Table;
break;
}
}
}
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;
}
private DataTable GetTable(string tableName, string ns)