473,799 Members | 2,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Relationship creation using DataSet Schema and XML Output

Hi,

I have created a dataset schema(*.xsd) which contain two element
"InvoiceHea der" and "InvoiceDetail" .

I set the primary key of both the element. for example "InvoiceHea der" -> id
and "InvoiceDet ail" -> "id, date"

Then I created a relationship between both these item using the key "id".
This create the one-to-many relationship.

I set the relationship object for "IsNested" to true.

Now I fill up both the "InvoiceHea der" and "InvoiceDet ail" from the database

When I execute the command WriteXML(). The output xml does not have the
correct nested relationship that i defined in the dataset schema. I need to
insert the following code to ensure the output is correct

--------------------------------------------------------------------

DataRelation paRel = xmlOut.Relation s.Add("paRel",n ew DataColumn[] {
xmlOut.InvoiceH eader.Columns["id"] }, new DataColumn[] {
xmlOut.InvoiceD etail.Columns["id"] });
paRel.Nested = true;

---------------------------------------------------------------------

So based on this i am assuming that the relationship created in the dataset
schema is not working or used?. How do i enable it to do the correct nesting
and relationship without the above code?. Thanks

Joey
Nov 17 '05 #1
0 1287

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

Similar topics

0
2055
by: Chi | last post by:
This is a problem that has been nagging me for a while, and I cannot figure out how to best solve the problem: I have a stored procedure that returns multi-level "nested" XML and inline XDR. My goal is to have a .NET application read the XML into a DataSet using the inline schema, and the relations automatically created according to the nesting of the elements. My query in the stored procedure looks similar to this:
1
1843
by: Paul | last post by:
Hey all Appologies for cross posting, but this post covers a few areas in one. I'm fairly new to XML and my ideas are over reaching my grasp (as well as possibly not fully understanding certain concepts). My basic questions are: 1. I want to create a database in SQLCE. I understand that a schema is used
0
1026
by: enrico sabbadin | last post by:
Hi, I've a schema which mpas quite good to a tabular datastructure, so I feed a dataset with it without problems. the problem is that I've an xml element that is correctly mapped as column of a table but it appears after a child table. In other words it's <table1>
1
3334
by: Chris Kennedy | last post by:
How do create a dataset from scratch based on an XML schema. This will not be filled by a dataadapter. It will be a dataset which I add rows to and then save as an XML file. All the example depend on filling the dataset. I have also tried creating it from the XML schema but I am having problems manipulating it. If someone could point me to some resources, that would be great as I can't find anything.
2
7564
by: Json | last post by:
Ok, brand new to SQLXML 3.0 and its various issues. Heres what I'm trying to do: 1. I am trying to load xml data into an empty SQL table from my .NET console application. 2. This isn't a huge amount of data so I'm not interested in BulkXMLLoad (or whatever its called). 3. I have the xml and xml schema ready to go, with (I hope) the proper sql annotations.
0
3431
by: nima | last post by:
Hi I have two tables in my database. PRODUCT and PRODUCT_GROUP. PRODUCT has a foreign key to PRODUCT_GROUP. I generated a typed dataset using VS.net and added a relationship between the two tables. When I call my get WebMethod for the PRODUCT table I get the System.Data.ConstraintException exception. The get WebMethod for PRODUCT_GROUP works fine. When I remove the relationship the get WebMethod for PRODUCT works fine too. Both tables...
1
1135
by: Brad | last post by:
I have a confusing problem and I think it acutally might be an IDE problem. I am using Visual Studio 2005 Standard. When I right click on my project and add an item I select Dataset. It used to bring up a designer where I was able to create the dataset from but now it is displaying what looks like and xml file. Does anybody know what is going on here? This is what it is showing in the IDE when I select to add a new dataset:
1
1362
by: Chad | last post by:
I am new to web services and biztalk, but I recently created an orchestration to handle a purchase order approval process. I used biztalk to publish the orchestration as a web service. My goal is to access all of the properties of the request...date, delivery date, vendor info and purchase items through a custom web interface I have developed. My hang up is how to work with purchase items since it has a one to many relationship to the...
1
1851
by: Elad | last post by:
hi, I'm sorry if this isn't the right group, I just didnt know which category to place this question in. Anyway, I have 2 problems: I got a web service which connects to a DB and puts the data in a DataSet, and sends back to the user the DataSet.GetXml() (I know that a Dataset is serializable, but i need it's xml. anyway, this method does not create tags with no values in the output xml, in case a certain field in the DB equals...
0
9689
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
10495
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...
1
10248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
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...
0
9085
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
7573
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...
1
4148
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
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
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.