ADO.NET

Moderators: None (Apply to moderate this forum)
Number of threads: 52
Number of posts: 66

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
making master-detail datatables from one datatable? Posted by hgoli on 15 Jun 2007 at 9:31 AM
hi.

I have a datatable object in memory and I want to separate it into 2 tables wich they are mater-detail. I know how can I make relationships between two tables, but I don't know how can I make a datatable object from another datatable object. (Because of my app limits, I can't change source datatable or select statement)

as a simple example, suppose that my datatable has these columns:

Customers_Orders:( customerName, customerID, orderID, orderDate )

Now I want to make two datatables with these colums:

Customers:( customerName, customerID )

Orders:( customerID, orderID, orderDate )

Then I want to relate them in a dataset object. How can I do that???

Thanks for your help.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.