473,788 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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( "TestColumn 1", GetType(String) )
dt.Columns.Add( "TestColumn 2", GetType(Integer ))

ds.DataSetName = "TestDataSe t"
ds.Tables.Add(d t)

For i = 0 To 10
row = dt.NewRow
row("TestColumn 1") = "This is row " & i
row("TestColumn 2") = i
dt.Rows.Add(row )

' The following code trigger the error after the DataSet
' is returned to the calling Window Form application
row.SetColumnEr ror("TestColumn 1", "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(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim ws As localhost.Servi ce1
Dim ds As DataSet

Try
ws = New localhost.Servi ce1
ds = ws.RetrieveData Set

Me.DataGrid1.Se tDataBinding(ds .Tables(0), "")
Catch ex As Exception
MsgBox(ex.Messa ge)
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 2026
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

"Programati x" <pr*********@no spam.com> wrote in message
news:Oa******** ******@TK2MSFTN GP12.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( "TestColumn 1", GetType(String) )
dt.Columns.Add( "TestColumn 2", GetType(Integer ))

ds.DataSetName = "TestDataSe t"
ds.Tables.Add(d t)

For i = 0 To 10
row = dt.NewRow
row("TestColumn 1") = "This is row " & i
row("TestColumn 2") = i
dt.Rows.Add(row )

' The following code trigger the error after the DataSet
' is returned to the calling Window Form application
row.SetColumnEr ror("TestColumn 1", "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(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim ws As localhost.Servi ce1
Dim ds As DataSet

Try
ws = New localhost.Servi ce1
ds = ws.RetrieveData Set

Me.DataGrid1.Se tDataBinding(ds .Tables(0), "")
Catch ex As Exception
MsgBox(ex.Messa ge)
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******@nospa m.pt> wrote in message
news:u2******** ******@TK2MSFTN GP11.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

"Programati x" <pr*********@no spam.com> wrote in message
news:Oa******** ******@TK2MSFTN GP12.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( "TestColumn 1", GetType(String) )
dt.Columns.Add( "TestColumn 2", GetType(Integer ))

ds.DataSetName = "TestDataSe t"
ds.Tables.Add(d t)

For i = 0 To 10
row = dt.NewRow
row("TestColumn 1") = "This is row " & i
row("TestColumn 2") = i
dt.Rows.Add(row )

' The following code trigger the error after the DataSet
' is returned to the calling Window Form application
row.SetColumnEr ror("TestColumn 1", "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(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim ws As localhost.Servi ce1
Dim ds As DataSet

Try
ws = New localhost.Servi ce1
ds = ws.RetrieveData Set

Me.DataGrid1.Se tDataBinding(ds .Tables(0), "")
Catch ex As Exception
MsgBox(ex.Messa ge)
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
2256
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 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
8
2410
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 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
19
9331
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 recognise datasets and requires a recordset. Can the datatypes be converted? At the Classic ASP end or .NET end? Can SOAP toolkit provide the conversion, can any toolkit provide a conversion? ...
2
1149
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 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
1
5554
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 other properties... bool error; string lastError; My whole class looks like this... using System;
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.