473,589 Members | 2,585 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataSet, Relation, IsNested and WebService

Hi all,

If I want to provide a typed dataset from a webservice and if that dataset
has relations that are nested (isNested=True) , then the relations(keyre fs)
are not available in the XSD that is offered. If I set IsNested to false or
default, then it is included in the XSD.
Is this a bug or by design?

Corno
Nov 21 '05 #1
5 2621
Hi John,

Which is it that you need? Keyrefs or not keyrefs? It seems you can get
the option you choose.

Dan Rogers
Microsoft Corporation
--------------------
From: "Corno" <Corno@dds%FAKE %.nl>
Subject: DataSet, Relation, IsNested and WebService
Date: Fri, 3 Dec 2004 16:35:14 +0100
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <uy************ **@TK2MSFTNGP09 .phx.gbl>
Newsgroups:
microsoft.publi c.dotnet.framew ork.adonet,micr osoft.public.do tnet.framework. w
ebservices
NNTP-Posting-Host: radex.isd.nl 194.171.50.61
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTNG XA03.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP0 9
.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :7791
microsoft.publi c.dotnet.framew ork.adonet:9638 6
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

Hi all,

If I want to provide a typed dataset from a webservice and if that dataset
has relations that are nested (isNested=True) , then the relations(keyre fs)
are not available in the XSD that is offered. If I set IsNested to false or
default, then it is included in the XSD.
Is this a bug or by design?

Corno

Nov 21 '05 #2
> Which is it that you need? Keyrefs or not keyrefs? It seems you can get
the option you choose.
Hi Dan,

Thanks for the forture cookie. I don't understand why setting a keyref to
nested should stop it being a keyref. Could you please elaborate?

Corno


Hi all,

If I want to provide a typed dataset from a webservice and if that dataset
has relations that are nested (isNested=True) , then the relations(keyre fs)
are not available in the XSD that is offered. If I set IsNested to false
or
default, then it is included in the XSD.
Is this a bug or by design?

Corno

Nov 21 '05 #3
Hi,

It just wasn't clear to me that you didn't already have a solution that
worked. Is it the case that either way you set it, you can't get the
result you desire? Or is your question one of "why does this setting work
the way it does"?

Dan
--------------------
From: "Corno" <Corno@dds%FAKE %.nl>
References: <uy************ **@TK2MSFTNGP09 .phx.gbl>
<$o************ **@cpmsftngxa10 .phx.gbl>
Subject: Re: DataSet, Relation, IsNested and WebService
Date: Fri, 3 Dec 2004 23:20:29 +0100
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <Oh************ **@TK2MSFTNGP15 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: ip51cf1b9a.dire ct-adsl.nl 81.207.27.154
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED02.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 5
.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :7822
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Which is it that you need? Keyrefs or not keyrefs? It seems you can get
the option you choose.
Hi Dan,

Thanks for the forture cookie. I don't understand why setting a keyref to
nested should stop it being a keyref. Could you please elaborate?

Corno


Hi all,

If I want to provide a typed dataset from a webservice and if that dataset
has relations that are nested (isNested=True) , then the relations(keyre fs)
are not available in the XSD that is offered. If I set IsNested to false
or
default, then it is included in the XSD.
Is this a bug or by design?

Corno


Nov 21 '05 #4

"Dan Rogers" <da***@microsof t.com> wrote in message
news:Yl******** *****@cpmsftngx a10.phx.gbl...
Hi,

It just wasn't clear to me that you didn't already have a solution that
worked. Is it the case that either way you set it, you can't get the
result you desire? Or is your question one of "why does this setting work
the way it does"?

Dan


I would like to be able declare that a certain relation is nested, so that
when I serialize a DataSet the XML Document is more readable. This works
fine as long as I don't combine it with a webservice because when I do
(adding the typed dataset to the webservice and setting the isNested
property of the relation in the dataset to true), the relation disappears
from the schema.

So, do I have a solution that works? Well yes and no; Yes, I'm able to add a
typed dataset to the webservice with relations. No, I can't set the relation
to nested or it disappears.

Is this a problem? Not a huge one, I just cannot figure out what's going
wrong.

greetings,

Corno
Nov 23 '05 #5
Corno,

For what it's worth, I tried doing this in Visual Studio 2005 (that's all I
have installed - sorry) .. and this problem did not happen. Here is the
dataset I got. .. and as you look at the very bottom - the nested property
is set to true.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
<?xml version="1.0" encoding="utf-8" ?>
- <DataSet1 xmlns="http://tempuri.org/">
- <xs:schema id="DataSet1" targetNamespace ="http://tempuri.org/DataSet1.xsd"
xmlns:mstns="ht tp://tempuri.org/DataSet1.xsd"
xmlns="http://tempuri.org/DataSet1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="u rn:schemas-microsoft-com:xml-msprop"
attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
- <xs:element name="DataSet1" msdata:IsDataSe t="true"
msprop:User_Dat aSetName="DataS et1"
msprop:DSGenera tor_DataSetName ="DataSet1">
- <xs:complexType >
- <xs:choice minOccurs="0" maxOccurs="unbo unded">
- <xs:element name="DataTable 2" msdata:SuspendV alidation="Fals e"
msprop:User_Tab leName="DataTab le2"
msprop:Generato r_SuspendValida tionPropName="S uspendValidatio n"
msprop:Generato r_TableClassNam e="DataTable2Da taTable"
msprop:Generato r_SuspendValida tionVarName="m_ suspendValidati on"
msprop:Generato r_RowClassName= "DataTable2 Row"
msprop:Generato r_RowEvArgName= "DataTable2RowC hangeEvent"
msprop:Generato r_RowEvHandlerN ame="DataTable2 RowChangeEventH andler"
msprop:Generato r_TablePropName ="DataTable2 "
msprop:Generato r_TableVarName= "tableDataTable 2">
- <xs:complexType >
- <xs:sequence>
<xs:element name="Column1"
msprop:Generato r_DelegateName= "Column1ChangeE ventHandler"
msprop:Generato r_ChangingEvent Name="Column1Ch anging"
msprop:Generato r_ColumnVarName InTable="column Column1"
msprop:Generato r_EventArgName= "Column1ChangeE ventArg"
msprop:User_Col umnName="Column 1"
msprop:Generato r_ColumnPropNam eInRow="Column1 "
msprop:Generato r_ChangedEventN ame="Column1Cha nged"
msprop:Generato r_ColumnPropNam eInTable="Colum n1Column" type="xs:string "
minOccurs="0" />
<xs:element name="Column2"
msprop:Generato r_DelegateName= "Column2ChangeE ventHandler"
msprop:Generato r_ChangingEvent Name="Column2Ch anging"
msprop:Generato r_ColumnVarName InTable="column Column2"
msprop:Generato r_EventArgName= "Column2ChangeE ventArg"
msprop:User_Col umnName="Column 2"
msprop:Generato r_ColumnPropNam eInRow="Column2 "
msprop:Generato r_ChangedEventN ame="Column2Cha nged"
msprop:Generato r_ColumnPropNam eInTable="Colum n2Column" type="xs:string "
minOccurs="0" />
- <xs:element name="DataTable 1" msdata:SuspendV alidation="Fals e"
msprop:User_Tab leName="DataTab le1"
msprop:Generato r_SuspendValida tionPropName="S uspendValidatio n"
msprop:Generato r_TableClassNam e="DataTable1Da taTable"
msprop:Generato r_SuspendValida tionVarName="m_ suspendValidati on"
msprop:Generato r_RowClassName= "DataTable1 Row"
msprop:Generato r_RowEvArgName= "DataTable1RowC hangeEvent"
msprop:Generato r_RowEvHandlerN ame="DataTable1 RowChangeEventH andler"
msprop:Generato r_TablePropName ="DataTable1 "
msprop:Generato r_TableVarName= "tableDataTable 1" minOccurs="0"
maxOccurs="unbo unded">
- <xs:complexType >
- <xs:sequence>
<xs:element name="Column1"
msprop:Generato r_DelegateName= "Column1ChangeE ventHandler"
msprop:Generato r_ChangingEvent Name="Column1Ch anging"
msprop:Generato r_ColumnVarName InTable="column Column1"
msprop:Generato r_EventArgName= "Column1ChangeE ventArg"
msprop:User_Col umnName="Column 1"
msprop:Generato r_ColumnPropNam eInRow="Column1 "
msprop:Generato r_ChangedEventN ame="Column1Cha nged"
msprop:Generato r_ColumnPropNam eInTable="Colum n1Column" type="xs:string "
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
- <xs:unique name="Constrain t1">
<xs:selector xpath=".//mstns:DataTable 2" />
<xs:field xpath="mstns:Co lumn1" />
</xs:unique>
- <xs:keyref name="FK_DataTa ble2_DataTable1 " refer="Constrai nt1"
msdata:IsNested ="true">
<xs:selector xpath=".//mstns:DataTable 1" />
<xs:field xpath="mstns:Co lumn1" />
</xs:keyref>
</xs:element>
</xs:schema>
<diffgr:diffgra m xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="u rn:schemas-microsoft-com:xml-diffgram-v1" />
</DataSet1>
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik

"Corno" <Corno@dds%FAKE %.nl> wrote in message
news:uy******** ******@TK2MSFTN GP09.phx.gbl...
Hi all,

If I want to provide a typed dataset from a webservice and if that dataset
has relations that are nested (isNested=True) , then the relations(keyre fs)
are not available in the XSD that is offered. If I set IsNested to false
or default, then it is included in the XSD.
Is this a bug or by design?

Corno

Nov 23 '05 #6

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

Similar topics

2
2011
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
7
354
by: Richard Myers | last post by:
Hello. I am getting an InvalidCastException which has revealed yet more of my ignorance. I cant believe i dont already know this and haven't encountered it before until now. I am consuming a dataset from a webservice. I wrote both the server and client apps and the both use the same middle teir. I fill a dataset on the server that has a relationship between two of the tables inside. The relationship is between two strongly typed tables...
1
6589
by: tom | last post by:
hello, i have seen multiple postings on the subject but no answer that addresses my question: I create a dataset using a xsd schema. the schema specifies a relation from one of the tables to the other table via a primary-secondary key on the tables. i load the data into the dataset.
1
4304
by: Andy | last post by:
Hello, I have a WebService that sends a client a DataSet as XML (I use a DataSet.GetXml to get the XML). The DataSet is filled by a DataAdapter in the WebService. The client coverts the XML Back to a DataSet (using StringReader sr = new StringReader(xml); DataSet ds = new DataSet(); ds.ReadXml(sr)). The client then makes changes to this DataSet, and sends the dirty dataset back to the WebService using another GetXml on 'ds'. The...
9
4365
by: Fox | last post by:
I have create a dataSet and two table (father and son table) and set a relationship between them (call father_uid (int)). Is there any simple way, that I can get the row data include father and son table items. (do not use dataGuid) eq father_uid, father_field1,father_field2,son_field1,son_field2 1 "ABCD" 123.00 "XXXX" 456.00
0
1280
by: Joey Lee | last post by:
Hi, I have created a dataset schema(*.xsd) which contain two element "InvoiceHeader" and "InvoiceDetail". I set the primary key of both the element. for example "InvoiceHeader" -> id and "InvoiceDetail" -> "id, date" Then I created a relationship between both these item using the key "id". This create the one-to-many relationship.
5
1654
by: moondaddy | last post by:
I'm writing an winforms app in vb.net 1.1 and am having trouble referencing a strongly typed dataset in the UI project. The dataset's source is behind a web service and the data project (client side) gets a reference to the dataset schema and all that comes with strongly typing a dataset via a reference to the web service. The business tier which depends on the data tier and also imports the namespace of the data project can reference...
4
2088
by: Robert Bravery | last post by:
Hi all, I have now correctly set up my dataset and two grids, so that the parent navigates the child. THe thing is that the child table is actually a lookup type table. It lists billing types for the parent table, so that I just store a key in the parent table, and the show the billing type description from the child I need to set this up in one grid. I have played arround with the tables and columns collection in the ID, but cant seem to...
2
2862
by: Joe | last post by:
Hi I have a dataset with 3 tables and 2 relations Is there a way to when I am at 1 row to tell if there is a relation on that row ??? I have the code hardcoded but try to make it work if the # of tables and #relations increase or decrease So I can just pass any dataset and walk thru the rows?? Thanks
0
7931
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
7865
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
6637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5731
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
5399
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
3889
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2374
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
1
1461
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1198
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.