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 / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

dataset merging

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Neil Chambers - 29 May 2008 15:34 GMT
I am trying to get my head around dataset merging but despite a little
research I could still use a pointer (or ten). Basically I want to perform
an outer join operation on a dataset (created from a file operation) and the
resulting sql query based on the contents of said dataset. Effectively I
would end up with two dataset tables in my application. If I were writing
this to action from two tables it would be thus:

SELECT ds.id, db.*
from
dataset ds LEFT OUTER JOIN
database db on db.field1 = ds.id

such that I retain the original dataset items. I have read something about a
dataset relationship but I do not see how this achieves the all-inclusive
results I am after.

any insight much appreciated :-)

n
sloan - 29 May 2008 15:46 GMT
The dataset "merge" method can do about 2 things from my experience.

1.  If you have N number of different datatables, it can merge the N number
of tables into 1 (common) dataset.

2.  If you have different ROWS, but the same table, you can merge the rows
together.  Most times, the rows will be different.

3.  A combo of 1 and 2.

If you try to merge rows and the rows have the same primary key, but you're
trying to merge columns of the same row, you'll have trouble.

Back to your question.  You can't do what you're trying with a dataset.  the
.select and .merge methods are very very basic.

You need to look at LINQ.  Or you'll have to loop and do your logic if
you're in a pre 3.5 framework.

..

>I am trying to get my head around dataset merging but despite a little
>research I could still use a pointer (or ten). Basically I want to perform
[quoted text clipped - 15 lines]
>
> n
Neil Chambers - 29 May 2008 16:39 GMT
Aha!

the primary key property does the trick. When I merge now it does so based
on the PK and I get the exact inclusive results I am after!

Many, many thanks!

: n)

> The dataset "merge" method can do about 2 things from my experience.
>
[quoted text clipped - 36 lines]
>>
>> n

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.