By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,169 Members | 1,484 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,169 IT Pros & Developers. It's quick & easy.

What's the most efficent way to create a dataset table from 2 join

P: n/a
Hi, I'm using vs2005 and .net 2.0. I have used 2 DirectorySearchers to
retrieve Active Directory data and put them into 2 separate dataset tables.
I want to create a 3rd dataset table by using the equivalent of SQL join
operation. This 3rd table will then be passed into Crystal Report.

1. Sometimes each table could contain 100,000 records or more. Is this the
most efficeint way to do this?
2. Since there is no join query for dataset tables, I tried creating a
datarelation but got an error message during run time: "This constraint
cannot be enabled as not all values have corresponding parent values."
I am looking for the join of the 2 tables. Only want to retrieve records
that exist in both tables. Of course there will be times when a record exist
in 1 table but not the other. But with this it's giving me error.
So, what do I do to retried the join records that I need?

3. I didn't define primary key for either tables. Do I need to do that
first to address the error?
4. My datarelation code:
dsReport.Relations.Add("relationComputers",
dsReport.Tables["PadComputers"].Columns["cn"],
dsReport.Tables["AdComputers"].Columns["objectSid"]);
Thank you.

--
Thanks.
Jan 26 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.