By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,558 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,558 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Jul 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
There is a known issue when using 1.1 on the server and
1.0 on the client side. It's because the dataset is
serialized differently for each version. So when the
client tries to deserialize it, it fails.

Jeff Levinson

Author of "Building Client/Server Applications with
VB.NET: An Example Driven Approach"
-----Original Message-----
Hi,

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

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

Now, here's the problem. On .NET Framework 1.1, if any rows in the datasetreturned contain errors (marked by calling the SetColumnError() method orsetting the RowError property of the DataRow), I get the following errormessage 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 AsSystem.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 theappropriate groups when making this post a crossposts post, please know thatI'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 theDataSet returned by WebService. It also has something to do with ADO .Net asI'm using DataSet. And it definitely has something to do with Windows Formapplication as if I force the Windows Form application project to run on..Net Framework 1.0, everything works fine.
.

Jul 19 '05 #2

P: n/a
You're not getting the idea here. The problem now OCCURS when the server
uses .NET Framework 1.1 and the client also uses .NET Framework 1.1.

The problem is FIXED if the client uses .NET Framework 1.0

"Jeff Levinson [mcsd]" <je***********@comcast.net> wrote in message
news:04****************************@phx.gbl...
There is a known issue when using 1.1 on the server and
1.0 on the client side. It's because the dataset is
serialized differently for each version. So when the
client tries to deserialize it, it fails.

Jeff Levinson

Author of "Building Client/Server Applications with
VB.NET: An Example Driven Approach"
-----Original Message-----
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.
.

Jul 19 '05 #3

P: n/a
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" <pr*********@nospam.com> wrote in message
news:Op**************@TK2MSFTNGP12.phx.gbl...
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.

Jul 19 '05 #4

P: n/a
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" <pr*********@nospam.com> wrote in message
news:Op**************@TK2MSFTNGP12.phx.gbl...
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.

Jul 19 '05 #5

P: n/a
But... there is no way to download it. Sigh...

"RogerS" <no****@hotmail.com> wrote in message
news:uf**************@TK2MSFTNGP10.phx.gbl...
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" <pr*********@nospam.com> wrote in message
news:Op**************@TK2MSFTNGP12.phx.gbl...
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.


Jul 19 '05 #6

P: n/a
Does this mean I have to pay US99 to get the fix?

"Programatix" <pr*********@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
But... there is no way to download it. Sigh...

"RogerS" <no****@hotmail.com> wrote in message
news:uf**************@TK2MSFTNGP10.phx.gbl...
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" <pr*********@nospam.com> wrote in message
news:Op**************@TK2MSFTNGP12.phx.gbl...
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.



Jul 19 '05 #7

P: n/a
> 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...

Jul 19 '05 #8

P: n/a
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" <ip***@hotmail.com> wrote in message
news:3F**************@hotmail.com...
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...

Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.