473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

2nd Repost: Problem Retrieving DataSet Returned By A WebService... anyone from Microsoft or anyone with solution?

Hi,

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

The Windows Form application will call the 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 (1,xxxxxxx)"

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

Is this a bug? Or I need to make some code adjustment because of changes to
the Framework?

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
2 1988
I'm almost sure the problem is with serialization of the dataset. When you
try to serialize a dataset with row errors, it will give you that error. So,
the problem is not specific to webservices. I think it's a bug in .NET
framework 1.1. I've posted about this issue also (and read others posts
regarding this also) and got no response from MS guys.

I read somewhere (don't remember the newsgroup) a post from someone saying
that MS has already admitted (not officially) it was a bug and it would be
solved in next service pack, but I couldn't confirm that information, as I
didn't see any post from Microsoft.

I hope Microsoft will provide us with some sort of fix or workaround to this
problem and I hope they at least respond to these growing number of posts
regarding this issue.

Sorry if MS already responded to this matter, but I've spent so many time in
searches regarding this and found nothing official!

Thanks,

Jorge Ribeiro

"Programatix" <pr*********@nospam.com> wrote in message
news:Oa**************@TK2MSFTNGP12.phx.gbl...
Hi,

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

The Windows Form application will call the 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 (1,xxxxxxx)"

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

Is this a bug? Or I need to make some code adjustment because of changes to the Framework?

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 #2
I'm sure agree with you. I have so far sent this same post to 3 Microsoft's
support guys and their never respond back to my post. Sigh...

"Jorge Ribeiro" <jo******@nospam.pt> wrote in message
news:u2**************@TK2MSFTNGP11.phx.gbl...
I'm almost sure the problem is with serialization of the dataset. When you
try to serialize a dataset with row errors, it will give you that error. So, the problem is not specific to webservices. I think it's a bug in .NET
framework 1.1. I've posted about this issue also (and read others posts
regarding this also) and got no response from MS guys.

I read somewhere (don't remember the newsgroup) a post from someone saying
that MS has already admitted (not officially) it was a bug and it would be
solved in next service pack, but I couldn't confirm that information, as I
didn't see any post from Microsoft.

I hope Microsoft will provide us with some sort of fix or workaround to this problem and I hope they at least respond to these growing number of posts
regarding this issue.

Sorry if MS already responded to this matter, but I've spent so many time in searches regarding this and found nothing official!

Thanks,

Jorge Ribeiro

"Programatix" <pr*********@nospam.com> wrote in message
news:Oa**************@TK2MSFTNGP12.phx.gbl...
Hi,

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

The Windows Form application will call the 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 (1,xxxxxxx)"

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

Is this a bug? Or I need to make some code adjustment because of changes

to
the Framework?

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Programatix | last post by:
Hi, I'm working on a project which includes WebServices and Windows Form application. The Windows Form application will call the WebServices to retrieve data from database. The data will be...
8
by: Programatix | last post by:
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...
19
by: Adam Short | last post by:
I am trying to write a routine that will connect a .NET server with a classic ASP server. I know the following code doesn't work! The data is being returned as a dataset, however ASP does not...
2
by: Programatix | last post by:
Hi, I'm working on a project which includes WebServices and Windows Form application. The Windows Form application will call the WebServices to retrieve data from database. The data will be...
1
by: J. Askey | last post by:
I am implementing a web service and thought it may be a good idea to return a more complex class (which I have called 'ServiceResponse') in order to wrap the original return value along with two...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.