PC Review


Reply
Thread Tools Rate Thread

BUG: Dataset Returned From A XML WebService Containing Error Data Caused Exeption To Be Thrown In A Window Form Application

 
 
Programatix
Guest
Posts: n/a
 
      1st Sep 2003
Hi,

I'm working on a project which includes XML WebServices and Windows Form
application.

The Windows Form application will call the XML WebServices to retrieve data
from database. The data will be returned as DataSet.

Now, here's the problem. On .NET Framework 1.1, if any rows in the dataset
returned contain errors (marked by calling the SetColumnError() method or
setting the RowError property of the DataRow), I get the following error
message in the Windows Form application,

"There is an error in XML doument (x,xxxxxxx)"

If I forced the Windows Form application to run on .NET Framework 1.0,
everything works fine.

Here's the partial code for the WebService project

Code:

<WebMethod()> _
Public Function RetrieveDataSet() As DataSet
Dim ds As New DataSet
Dim dt As New DataTable
Dim row As DataRow
Dim i As Integer

dt.TableName = "TestTable"
dt.Columns.Add("TestColumn1", GetType(String))
dt.Columns.Add("TestColumn2", GetType(Integer))

ds.DataSetName = "TestDataSet"
ds.Tables.Add(dt)

For i = 0 To 10
row = dt.NewRow
row("TestColumn1") = "This is row " & i
row("TestColumn2") = i
dt.Rows.Add(row)

' The following code trigger the error after the DataSet
' is returned to the calling Window Form application
row.SetColumnError("TestColumn1", "Error message here")
Next

Return ds
End Function



For the Windows Form application, you need to insert a datagrid control
(assumed as datagrid1). It will look something like this,

Code:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim ws As localhost.Service1
Dim ds As DataSet

Try
ws = New localhost.Service1
ds = ws.RetrieveDataSet

Me.DataGrid1.SetDataBinding(ds.Tables(0), "")
Catch ex As Exception
MsgBox(ex.Message)
Finally
If (Not (ws Is Nothing)) Then
ws.Dispose()
End If
End Try
End Sub


I really hope someone could help me out with this one.

Thanks in advance.

ps: Please, before anyone reply to state that I did not choose the
appropriate groups when making this post a crossposts post, please know that
I'm currently in blind on what is causing this error. Is it the WebService?
or is it the ADO .Net? or is it Windows Form application? or is it VB .Net?
Well, it has something to do with WebService as it only happens to the
DataSet returned by WebService. It also has something to do with ADO .Net as
I'm using DataSet. And it definitely has something to do with Windows Form
application as if I force the Windows Form application project to run on
..Net Framework 1.0, everything works fine.


 
Reply With Quote
 
 
 
 
RogerS
Guest
Posts: n/a
 
      2nd Sep 2003
I (as well as others) have posted multiple times in different groups and
have yet to recieve any response on this issue. It is extremely frustrating
because it is easy to reproduce and yet I have seen no one from MS offer to
look into it or acknowlege it. It would at least be comforting to hear them
say "yes, there is a problem and we are looking into it" but I haven't even
got that yet. Being able to set RowErrors is a powerful tool but as you see,
it will not work through web services returning a dataset as it will produce
the message you indicate below.
Roger

"Programatix" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I'm working on a project which includes XML WebServices and Windows Form
> application.
>
> The Windows Form application will call the XML WebServices to retrieve

data
> from database. The data will be returned as DataSet.
>
> Now, here's the problem. On .NET Framework 1.1, if any rows in the dataset
> returned contain errors (marked by calling the SetColumnError() method or
> setting the RowError property of the DataRow), I get the following error
> message in the Windows Form application,
>
> "There is an error in XML doument (x,xxxxxxx)"
>
> If I forced the Windows Form application to run on .NET Framework 1.0,
> everything works fine.
>
> Here's the partial code for the WebService project
>
> Code:
>
> <WebMethod()> _
> Public Function RetrieveDataSet() As DataSet
> Dim ds As New DataSet
> Dim dt As New DataTable
> Dim row As DataRow
> Dim i As Integer
>
> dt.TableName = "TestTable"
> dt.Columns.Add("TestColumn1", GetType(String))
> dt.Columns.Add("TestColumn2", GetType(Integer))
>
> ds.DataSetName = "TestDataSet"
> ds.Tables.Add(dt)
>
> For i = 0 To 10
> row = dt.NewRow
> row("TestColumn1") = "This is row " & i
> row("TestColumn2") = i
> dt.Rows.Add(row)
>
> ' The following code trigger the error after the DataSet
> ' is returned to the calling Window Form application
> row.SetColumnError("TestColumn1", "Error message here")
> Next
>
> Return ds
> End Function
>
>
>
> For the Windows Form application, you need to insert a datagrid control
> (assumed as datagrid1). It will look something like this,
>
> Code:
>
> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> Dim ws As localhost.Service1
> Dim ds As DataSet
>
> Try
> ws = New localhost.Service1
> ds = ws.RetrieveDataSet
>
> Me.DataGrid1.SetDataBinding(ds.Tables(0), "")
> Catch ex As Exception
> MsgBox(ex.Message)
> Finally
> If (Not (ws Is Nothing)) Then
> ws.Dispose()
> End If
> End Try
> End Sub
>
>
> I really hope someone could help me out with this one.
>
> Thanks in advance.
>
> ps: Please, before anyone reply to state that I did not choose the
> appropriate groups when making this post a crossposts post, please know

that
> I'm currently in blind on what is causing this error. Is it the

WebService?
> or is it the ADO .Net? or is it Windows Form application? or is it VB

..Net?
> Well, it has something to do with WebService as it only happens to the
> DataSet returned by WebService. It also has something to do with ADO .Net

as
> I'm using DataSet. And it definitely has something to do with Windows Form
> application as if I force the Windows Form application project to run on
> .Net Framework 1.0, everything works fine.
>
>



 
Reply With Quote
 
RogerS
Guest
Posts: n/a
 
      3rd Sep 2003
I guess today I searched on the right keywords - I have looked before but
did not find the following:
http://support.microsoft.com/default.aspx?scid=kb;[LN];818587

Knowledge Base Article 818587
Fix: Regression in Dataset Serialization in Visual Studio .NET 1.1 when a
datarow contains a rowError or a ColumnError Property

Roger




"Programatix" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I'm working on a project which includes XML WebServices and Windows Form
> application.
>
> The Windows Form application will call the XML WebServices to retrieve

data
> from database. The data will be returned as DataSet.
>
> Now, here's the problem. On .NET Framework 1.1, if any rows in the dataset
> returned contain errors (marked by calling the SetColumnError() method or
> setting the RowError property of the DataRow), I get the following error
> message in the Windows Form application,
>
> "There is an error in XML doument (x,xxxxxxx)"
>
> If I forced the Windows Form application to run on .NET Framework 1.0,
> everything works fine.
>
> Here's the partial code for the WebService project
>
> Code:
>
> <WebMethod()> _
> Public Function RetrieveDataSet() As DataSet
> Dim ds As New DataSet
> Dim dt As New DataTable
> Dim row As DataRow
> Dim i As Integer
>
> dt.TableName = "TestTable"
> dt.Columns.Add("TestColumn1", GetType(String))
> dt.Columns.Add("TestColumn2", GetType(Integer))
>
> ds.DataSetName = "TestDataSet"
> ds.Tables.Add(dt)
>
> For i = 0 To 10
> row = dt.NewRow
> row("TestColumn1") = "This is row " & i
> row("TestColumn2") = i
> dt.Rows.Add(row)
>
> ' The following code trigger the error after the DataSet
> ' is returned to the calling Window Form application
> row.SetColumnError("TestColumn1", "Error message here")
> Next
>
> Return ds
> End Function
>
>
>
> For the Windows Form application, you need to insert a datagrid control
> (assumed as datagrid1). It will look something like this,
>
> Code:
>
> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> Dim ws As localhost.Service1
> Dim ds As DataSet
>
> Try
> ws = New localhost.Service1
> ds = ws.RetrieveDataSet
>
> Me.DataGrid1.SetDataBinding(ds.Tables(0), "")
> Catch ex As Exception
> MsgBox(ex.Message)
> Finally
> If (Not (ws Is Nothing)) Then
> ws.Dispose()
> End If
> End Try
> End Sub
>
>
> I really hope someone could help me out with this one.
>
> Thanks in advance.
>
> ps: Please, before anyone reply to state that I did not choose the
> appropriate groups when making this post a crossposts post, please know

that
> I'm currently in blind on what is causing this error. Is it the

WebService?
> or is it the ADO .Net? or is it Windows Form application? or is it VB

..Net?
> Well, it has something to do with WebService as it only happens to the
> DataSet returned by WebService. It also has something to do with ADO .Net

as
> I'm using DataSet. And it definitely has something to do with Windows Form
> application as if I force the Windows Form application project to run on
> .Net Framework 1.0, everything works fine.
>
>



 
Reply With Quote
 
Programatix
Guest
Posts: n/a
 
      3rd Sep 2003
But... there is no way to download it. Sigh...

"RogerS" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I guess today I searched on the right keywords - I have looked before but
> did not find the following:
> http://support.microsoft.com/default.aspx?scid=kb;[LN];818587
>
> Knowledge Base Article 818587
> Fix: Regression in Dataset Serialization in Visual Studio .NET 1.1 when a
> datarow contains a rowError or a ColumnError Property
>
> Roger
>
>
>
>
> "Programatix" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> >
> > I'm working on a project which includes XML WebServices and Windows Form
> > application.
> >
> > The Windows Form application will call the XML WebServices to retrieve

> data
> > from database. The data will be returned as DataSet.
> >
> > Now, here's the problem. On .NET Framework 1.1, if any rows in the

dataset
> > returned contain errors (marked by calling the SetColumnError() method

or
> > setting the RowError property of the DataRow), I get the following error
> > message in the Windows Form application,
> >
> > "There is an error in XML doument (x,xxxxxxx)"
> >
> > If I forced the Windows Form application to run on .NET Framework 1.0,
> > everything works fine.
> >
> > Here's the partial code for the WebService project
> >
> > Code:
> >
> > <WebMethod()> _
> > Public Function RetrieveDataSet() As DataSet
> > Dim ds As New DataSet
> > Dim dt As New DataTable
> > Dim row As DataRow
> > Dim i As Integer
> >
> > dt.TableName = "TestTable"
> > dt.Columns.Add("TestColumn1", GetType(String))
> > dt.Columns.Add("TestColumn2", GetType(Integer))
> >
> > ds.DataSetName = "TestDataSet"
> > ds.Tables.Add(dt)
> >
> > For i = 0 To 10
> > row = dt.NewRow
> > row("TestColumn1") = "This is row " & i
> > row("TestColumn2") = i
> > dt.Rows.Add(row)
> >
> > ' The following code trigger the error after the DataSet
> > ' is returned to the calling Window Form application
> > row.SetColumnError("TestColumn1", "Error message here")
> > Next
> >
> > Return ds
> > End Function
> >
> >
> >
> > For the Windows Form application, you need to insert a datagrid control
> > (assumed as datagrid1). It will look something like this,
> >
> > Code:
> >
> > Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles MyBase.Load
> > Dim ws As localhost.Service1
> > Dim ds As DataSet
> >
> > Try
> > ws = New localhost.Service1
> > ds = ws.RetrieveDataSet
> >
> > Me.DataGrid1.SetDataBinding(ds.Tables(0), "")
> > Catch ex As Exception
> > MsgBox(ex.Message)
> > Finally
> > If (Not (ws Is Nothing)) Then
> > ws.Dispose()
> > End If
> > End Try
> > End Sub
> >
> >
> > I really hope someone could help me out with this one.
> >
> > Thanks in advance.
> >
> > ps: Please, before anyone reply to state that I did not choose the
> > appropriate groups when making this post a crossposts post, please know

> that
> > I'm currently in blind on what is causing this error. Is it the

> WebService?
> > or is it the ADO .Net? or is it Windows Form application? or is it VB

> .Net?
> > Well, it has something to do with WebService as it only happens to the
> > DataSet returned by WebService. It also has something to do with ADO

..Net
> as
> > I'm using DataSet. And it definitely has something to do with Windows

Form
> > application as if I force the Windows Form application project to run on
> > .Net Framework 1.0, everything works fine.
> >
> >

>
>



 
Reply With Quote
 
Programatix
Guest
Posts: n/a
 
      3rd Sep 2003
Does this mean I have to pay US99 to get the fix?

"Programatix" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> But... there is no way to download it. Sigh...
>
> "RogerS" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I guess today I searched on the right keywords - I have looked before

but
> > did not find the following:
> > http://support.microsoft.com/default.aspx?scid=kb;[LN];818587
> >
> > Knowledge Base Article 818587
> > Fix: Regression in Dataset Serialization in Visual Studio .NET 1.1 when

a
> > datarow contains a rowError or a ColumnError Property
> >
> > Roger
> >
> >
> >
> >
> > "Programatix" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi,
> > >
> > > I'm working on a project which includes XML WebServices and Windows

Form
> > > application.
> > >
> > > The Windows Form application will call the XML WebServices to retrieve

> > data
> > > from database. The data will be returned as DataSet.
> > >
> > > Now, here's the problem. On .NET Framework 1.1, if any rows in the

> dataset
> > > returned contain errors (marked by calling the SetColumnError() method

> or
> > > setting the RowError property of the DataRow), I get the following

error
> > > message in the Windows Form application,
> > >
> > > "There is an error in XML doument (x,xxxxxxx)"
> > >
> > > If I forced the Windows Form application to run on .NET Framework 1.0,
> > > everything works fine.
> > >
> > > Here's the partial code for the WebService project
> > >
> > > Code:
> > >
> > > <WebMethod()> _
> > > Public Function RetrieveDataSet() As DataSet
> > > Dim ds As New DataSet
> > > Dim dt As New DataTable
> > > Dim row As DataRow
> > > Dim i As Integer
> > >
> > > dt.TableName = "TestTable"
> > > dt.Columns.Add("TestColumn1", GetType(String))
> > > dt.Columns.Add("TestColumn2", GetType(Integer))
> > >
> > > ds.DataSetName = "TestDataSet"
> > > ds.Tables.Add(dt)
> > >
> > > For i = 0 To 10
> > > row = dt.NewRow
> > > row("TestColumn1") = "This is row " & i
> > > row("TestColumn2") = i
> > > dt.Rows.Add(row)
> > >
> > > ' The following code trigger the error after the DataSet
> > > ' is returned to the calling Window Form application
> > > row.SetColumnError("TestColumn1", "Error message here")
> > > Next
> > >
> > > Return ds
> > > End Function
> > >
> > >
> > >
> > > For the Windows Form application, you need to insert a datagrid

control
> > > (assumed as datagrid1). It will look something like this,
> > >
> > > Code:
> > >
> > > Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> > > System.EventArgs) Handles MyBase.Load
> > > Dim ws As localhost.Service1
> > > Dim ds As DataSet
> > >
> > > Try
> > > ws = New localhost.Service1
> > > ds = ws.RetrieveDataSet
> > >
> > > Me.DataGrid1.SetDataBinding(ds.Tables(0), "")
> > > Catch ex As Exception
> > > MsgBox(ex.Message)
> > > Finally
> > > If (Not (ws Is Nothing)) Then
> > > ws.Dispose()
> > > End If
> > > End Try
> > > End Sub
> > >
> > >
> > > I really hope someone could help me out with this one.
> > >
> > > Thanks in advance.
> > >
> > > ps: Please, before anyone reply to state that I did not choose the
> > > appropriate groups when making this post a crossposts post, please

know
> > that
> > > I'm currently in blind on what is causing this error. Is it the

> > WebService?
> > > or is it the ADO .Net? or is it Windows Form application? or is it VB

> > .Net?
> > > Well, it has something to do with WebService as it only happens to the
> > > DataSet returned by WebService. It also has something to do with ADO

> .Net
> > as
> > > I'm using DataSet. And it definitely has something to do with Windows

> Form
> > > application as if I force the Windows Form application project to run

on
> > > .Net Framework 1.0, everything works fine.
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Joe White
Guest
Posts: n/a
 
      4th Sep 2003
> Does this mean I have to pay US99 to get the fix?

(sorry about that last post, I hit the wrong key)

Anyway, hopefully not. From the same page:

"NOTE: In special cases, charges that are ordinarily incurred for
support calls may be canceled if a Microsoft Support Professional
determines that a specific update will resolve your problem. The usual
support costs will apply to additional support questions and issues that
do not qualify for the specific update in question."

It remains to be seen what they consider a "special case".
Unfortunately, it sounds like they still charge you up-front, and then
maybe refund it later...

 
Reply With Quote
 
Programatix
Guest
Posts: n/a
 
      4th Sep 2003
I live in Malaysia, US99 is about RM396 which is 1/3 of my monthly salary.
Anyway, why should Microsoft do that? It is a fix to their own mistakes
(bugs). Sigh...

"Joe White" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > Does this mean I have to pay US99 to get the fix?

>
> (sorry about that last post, I hit the wrong key)
>
> Anyway, hopefully not. From the same page:
>
> "NOTE: In special cases, charges that are ordinarily incurred for
> support calls may be canceled if a Microsoft Support Professional
> determines that a specific update will resolve your problem. The usual
> support costs will apply to additional support questions and issues that
> do not qualify for the specific update in question."
>
> It remains to be seen what they consider a "special case".
> Unfortunately, it sounds like they still charge you up-front, and then
> maybe refund it later...
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception thrown by webservice and caught by ASP.NET application Mark Microsoft ASP .NET 1 4th Apr 2006 04:46 PM
BUG: Dataset Returned From A XML WebService Containing Error Data Caused Exeption To Be Thrown In A Window Form Application Programatix Microsoft Dot NET Framework Forms 6 4th Sep 2003 10:31 AM
BUG: Dataset Returned From A XML WebService Containing Error Data Caused Exeption To Be Thrown In A Window Form Application Programatix Microsoft Dot NET 8 4th Sep 2003 10:31 AM
BUG: Dataset Returned From A XML WebService Containing Error Data Caused Exeption To Be Thrown In A Window Form Application Programatix Microsoft Dot NET Framework 6 4th Sep 2003 10:31 AM
BUG: Dataset Returned From A XML WebService Containing Error Data Caused Exeption To Be Thrown In A Window Form Application Programatix Microsoft ADO .NET 6 4th Sep 2003 10:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:46 PM.