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

Typed dataset questions: Translation into another typed dataset

Trying to get some feedback.

Here's the scenerio.

We are processing XML data which we generated a typed dataset to represent
the XML document being processed. After procesing is complete we would like
to add/update/delete the data in multiple databases. Here lies the
disconnect. The XML representation is seperated from the physical model(s)
in the database there for the typed datasets are drastically different. What
is the best way to transform a typed dataset into another typed dataset
effeciently. Please do not suggest a serializing the object into XML and
applying a stylesheet. What is the most effecient method to map the objects?

Thanks
-Joe


Nov 16 '05 #1
2 2237

"BeanTownBizTalkGuru" <Be*****************@discussions.microsoft.com> wrote
in message news:C2**********************************@microsof t.com...
Trying to get some feedback.

Here's the scenerio.

We are processing XML data which we generated a typed dataset to represent
the XML document being processed. After procesing is complete we would
like
to add/update/delete the data in multiple databases. Here lies the
disconnect. The XML representation is seperated from the physical
model(s)
in the database there for the typed datasets are drastically different.
What
is the best way to transform a typed dataset into another typed dataset
effeciently. Please do not suggest a serializing the object into XML and
applying a stylesheet. What is the most effecient method to map the
objects?

The most efficient method is to write code to do it. Add new rows to the
target dataset based on the data in the source dataset.

Something like:

TypedDS1 ds1 = ...;
TypedDS2 ds2 = new TypedDS2;

foreach (TypedDS1.Table1Row r in ds1.Table1.Rows)
{
TypedDS2.TableXRow dr = ds2.TableX.NewTableXRow();
dr.A = r.B;
...
}

David
Nov 16 '05 #2
Thanks Dave, that is what I expected. I am tossing around the idea of
writing a custom serialization class for the source XML document to the typed
dataset of each type. Not really sure what the final decision will be
though. THanks for the help.

"David Browne" wrote:

"BeanTownBizTalkGuru" <Be*****************@discussions.microsoft.com> wrote
in message news:C2**********************************@microsof t.com...
Trying to get some feedback.

Here's the scenerio.

We are processing XML data which we generated a typed dataset to represent
the XML document being processed. After procesing is complete we would
like
to add/update/delete the data in multiple databases. Here lies the
disconnect. The XML representation is seperated from the physical
model(s)
in the database there for the typed datasets are drastically different.
What
is the best way to transform a typed dataset into another typed dataset
effeciently. Please do not suggest a serializing the object into XML and
applying a stylesheet. What is the most effecient method to map the
objects?

The most efficient method is to write code to do it. Add new rows to the
target dataset based on the data in the source dataset.

Something like:

TypedDS1 ds1 = ...;
TypedDS2 ds2 = new TypedDS2;

foreach (TypedDS1.Table1Row r in ds1.Table1.Rows)
{
TypedDS2.TableXRow dr = ds2.TableX.NewTableXRow();
dr.A = r.B;
...
}

David

Nov 16 '05 #3

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

Similar topics

2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
2
by: Magali Desmedt | last post by:
Hi, I have this delegate: public delegate DataSet TestDelegate1(string code); But when I try to pass methods that return a typed dataset instead of a regular dataset I get an error saying the...
1
by: HardBap | last post by:
I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe tool. I want to be able to access fields using ds.Customer.CompanyName. The problem is when I return this DataSet from a...
1
by: Ernie Josefik | last post by:
1. I am using a typed dataset which is being filled from an Oracle database. If any of the columns contain a null value I get an error when accessing the column e.g. ...
5
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...
3
by: Freeon | last post by:
Hi, I am looking for a way to sort a strong typed dataset. It would seem the most straightforward way is to use a dataview. The only problem is when I use the dataview I seem to loose the strong...
5
by: John | last post by:
Hi, I am developing a windows app using C# 2005. This app uses SQL Server or Oracle database depending on the what the user is using. Can I create one typed dataset and use it for SQL Server and...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
12
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.