L
Leeor Chernov
Hi ,
I am using the method:
DSSap.ReadXml( XmlPath,XmlReadMode.InferSchema );
And as I expected I get an error when the xml does not matching my DataSet that contains already a schema ,
The problem is that I get the following to-much detailed message:
System.FormatException: Input string was not in a correct format.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider)
at System.Xml.XmlConvert.ToInt32(String s)
at System.Data.Common.Int32Storage.ConvertXmlToObject(String s)
at System.Data.DataColumn.ConvertXmlToObject(String s)
at System.Data.XmlDataLoader.SetRowValueFromXmlText(DataRow row, DataColumn col, String xmlText)
at System.Data.XmlDataLoader.LoadRowData(DataRow row, XmlElement rowElement)
at System.Data.XmlDataLoader.LoadRows(DataRow parentRow, XmlNode parentElement) at System.Data.XmlDataLoader.LoadRows(DataRow parentRow, XmlNode parentElement)
at System.Data.XmlDataLoader.LoadData(XmlDocument xdoc)
at System.Data.DataSet.ReadXml(XmlReader reader, XmlReadMode mode, Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName, XmlReadMode mode)
at Mod.OLSapRefresh.BLSAPBase.Insert() in c:\\vss\\saprefresh\\olsaprefresh\\blsapbase.cs:line 62
The DataSet.HasErrors in the catch block is still false ,
and I cant use the fllowing code from msdn to find out the specific column or row:
if ( this.HasErrors == true )
{
foreach(DataTable myTable in this.Tables)
{
foreach(DataRow myRow in myTable.Rows)
{
if(myRow.HasErrors)
{
Console.WriteLine(myRow.RowError);
}
Since HasErrors = false.
Why HasErrors = false altough I have an error???
, And How can I get the specific Row and Column(specific) error???
TNX
Leeor Chernov
R&D ,
SPL Software
I am using the method:
DSSap.ReadXml( XmlPath,XmlReadMode.InferSchema );
And as I expected I get an error when the xml does not matching my DataSet that contains already a schema ,
The problem is that I get the following to-much detailed message:
System.FormatException: Input string was not in a correct format.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider)
at System.Xml.XmlConvert.ToInt32(String s)
at System.Data.Common.Int32Storage.ConvertXmlToObject(String s)
at System.Data.DataColumn.ConvertXmlToObject(String s)
at System.Data.XmlDataLoader.SetRowValueFromXmlText(DataRow row, DataColumn col, String xmlText)
at System.Data.XmlDataLoader.LoadRowData(DataRow row, XmlElement rowElement)
at System.Data.XmlDataLoader.LoadRows(DataRow parentRow, XmlNode parentElement) at System.Data.XmlDataLoader.LoadRows(DataRow parentRow, XmlNode parentElement)
at System.Data.XmlDataLoader.LoadData(XmlDocument xdoc)
at System.Data.DataSet.ReadXml(XmlReader reader, XmlReadMode mode, Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName, XmlReadMode mode)
at Mod.OLSapRefresh.BLSAPBase.Insert() in c:\\vss\\saprefresh\\olsaprefresh\\blsapbase.cs:line 62
The DataSet.HasErrors in the catch block is still false ,
and I cant use the fllowing code from msdn to find out the specific column or row:
if ( this.HasErrors == true )
{
foreach(DataTable myTable in this.Tables)
{
foreach(DataRow myRow in myTable.Rows)
{
if(myRow.HasErrors)
{
Console.WriteLine(myRow.RowError);
}
Since HasErrors = false.
Why HasErrors = false altough I have an error???
, And How can I get the specific Row and Column(specific) error???
TNX
Leeor Chernov
R&D ,
SPL Software