473,406 Members | 2,336 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,406 software developers and data experts.

copying a datatable content from an untyped dataset into a table which is inside a typed dataset

Hi Techies,

I am facing problem in copying content of table from a untyped dataset into
to a table inside the typed dataset. I wanted to copy the data into typed
dataset in order to ease the further processing using typed references.

DataSet ds = getDataFromDB(); - i am getting the dataset ds from a
webservice

I have got MyXSD which decsribes the shcema for the table which i am getting
from the webservice
and i am trying to cast like following
MyXSD myds = (MyXSD)ds; ==> but giving me invalid exception error

And i tried copying the table from ds into myds like
myds.Tables[0] = ds.Tables[0];

but it is giving me error saying myds.Tables[0] is READ ONLY....

I tried ImportRow also but getting errors and i don't want to manually go
thru the rows and put into my Typed dataset..

Thanks for your help.

Nedu
Nov 17 '05 #1
2 1828
Hi All,
I am facing problem in copying content of table from a untyped dataset into
to a table inside the typed dataset. I wanted to copy the data into typed
dataset in order to ease the further processing using typed references.

DataSet ds = getDataFromDB(); - i am getting the dataset ds from a
webservice

I have got MyXSD which decsribes the shcema for the table which i am getting
from the webservice
and i am trying to cast like following
MyXSD myds = (MyXSD)ds; ==> but giving me invalid exception error

And i tried copying the table from ds into myds like
myds.Tables[0] = ds.Tables[0];

but it is giving me error saying myds.Tables[0] is READ ONLY....

I tried ImportRow also but getting errors and i don't want to manually go
thru the rows and put into my Typed dataset..

Thanks for your help.

Nedu

Nov 17 '05 #2
Cor
Hi Nedu,
myds.Tables[0] = ds.Tables[0];


I dont believe this can work.
It seems if you want to add a table without his scheme on a already (or not)
existing place.

But maybe you just mean?
myds=ds.copy;

Cor


Nov 17 '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...
1
by: Somebody_Out_There | last post by:
Hello, I am trying to create a strongly typed datatable/dataset from an untyped dataset or datatable returned from a stored proc. The structure of the table cannot be static since the results...
3
by: Rakesh Rajan | last post by:
Hi, I have a method, which opens a connection, creates an untyped datable, fills it and returns it back. I have defined a typed datatable in my application as well. For some reasons, I have to...
2
by: nabil m | last post by:
hi i have a couple of questions: 1) what is the difference between type and untyped dataset - i would like t ouse the typed dataset to take adv of intellisense- but the dataset i have created...
1
by: nabil m | last post by:
hi i have a couple of questions: 1) what is the difference between type and untyped dataset - i would like t ouse the typed dataset to take adv of intellisense- but the dataset i have created...
2
by: thomson | last post by:
Hi All, What is the difference between a typed dataset and an untyped datset, Where can be this used actually, I mean in which situation which has to be used, In case anyone has got some...
7
by: Przemo | last post by:
Hi, I wonder about performerce comparision between these two types of DataSets. Are benefits of typed DataSets enought to beat speed of untyped ones? Or it doesn't matter? What do you think? ...
4
by: Ronald S. Cook | last post by:
I've always used untyped datasets. In a Microsoft course, it walks through creating typed datasets and harps on the benefits. It has you drag all these things around ..wizard, wizard, wizard......
0
by: vrushalik | last post by:
Hi, i want to know pros and cons of both Typed and Untyped dataset in detail. can we customize untyped dataset? What is benefit of Typed dataset? is there significant difference between...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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
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...
0
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...

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.