Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

CREATE A DATASET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Siu - 22 Apr 2005 15:45 GMT
Hi,
I would like to add three table to a DataSet: these three tables have tha
same structure (columns name and type) but contains different records.

When I try to add them, at the second table, I receive an error: "This table
belongs already to another DataSet"

Could you please help me to solve the problem
Norman Yuan - 22 Apr 2005 16:15 GMT
You cannot hae two DataTables in a DataSet with the same name, whether the
DataTables have the same sturcture or not. To solve the problem, call first
DataTable "Table1", the second, "Table2", and so on, as long as they are
different.

> Hi,
> I would like to add three table to a DataSet: these three tables have tha
[quoted text clipped - 4 lines]
>
> Could you please help me to solve the problem
Siu - 25 Apr 2005 08:31 GMT
Hi Norman,
the table are three and they have different name... do you have other
suggestion?
I precise that the table are got from existing dataset and the three have
the same structure... here is my code:

DataTable dt1 = GetTableFromDataSet1();
DataTable dt2 = GetTableFromDataSet2();
DataTable dt3 = GetTableFromDataSet3();

Thanks for the help

> You cannot hae two DataTables in a DataSet with the same name, whether the
> DataTables have the same sturcture or not. To solve the problem, call first
[quoted text clipped - 10 lines]
> >
> > Could you please help me to solve the problem
Allan Yuill - 23 Apr 2005 15:48 GMT
You should also look at the DataTable.Clone method to ensure that you have a
completely separate instance of each table before you fill them with
records.

Allan

> Hi,
> I would like to add three table to a DataSet: these three tables have tha
[quoted text clipped - 5 lines]
>
> Could you please help me to solve the problem
Siu - 25 Apr 2005 08:34 GMT
Hi Allan,
the Clone method is interesting, but I would like to clone also the records,
not only the structure... is there a way to solve this issue? I don' want to
read sequentially the original table and fill the new one, because of low
performance!

Thanks

> You should also look at the DataTable.Clone method to ensure that you have a
> completely separate instance of each table before you fill them with
[quoted text clipped - 11 lines]
> >
> > Could you please help me to solve the problem
Siu - 25 Apr 2005 08:36 GMT
Hi Allan,
Clone method is interesting, but I would  like to clone also the records...
is there a way to solve this issue? I don't want to read sequentially the
original table and fill the new one, because of low performance.

Thanks.

> You should also look at the DataTable.Clone method to ensure that you have a
> completely separate instance of each table before you fill them with
[quoted text clipped - 11 lines]
> >
> > Could you please help me to solve the problem

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.