473,395 Members | 1,437 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,395 software developers and data experts.

Relationship creation using DataSet Schema and XML Output

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.

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

Now I fill up both the "InvoiceHeader" and "InvoiceDetail" 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.Relations.Add("paRel",new DataColumn[] {
xmlOut.InvoiceHeader.Columns["id"] }, new DataColumn[] {
xmlOut.InvoiceDetail.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 1270

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

Similar topics

0
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...
1
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...
0
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...
1
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...
2
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...
0
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...
1
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...
1
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...
1
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...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
0
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...

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.