DataRelation General Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is taken from MSDN Documentation:

It is important to understand the difference between a true join and the
function of a DataRelation object. In a true join, records are taken from
parent and child tables and put into a single, flat recordset. When you use a
DataRelation object, no new recordset is created. Instead, the relation
tracks the relationship between tables and keeps parent and child records in
synch.

That being said, is there an equivelant to an SQL join for the DataSet? I'm
thinking something where rows from different but related tables are snapped
togetherinto a signle view and you can just refer to different columns within
a single rowset, rather than have to call GetChildRows or GetParentRow and
deal with the separate entity. Just wondering. Thanks...
 
Ben,

Can you show me that page where recordset is used in combination with the
datarelation, it interest me.

And therefore answering is a little bit difficult, because than I don't
understand what you ask and becomes it a lot of guessing.

Cor
 
Hi Cor,

Thanks for your reply. I actually don't have a code segment that is giving
me trouble. I'm able to do what I need to with the GetParentRow function. I
was just curious if there is a way to do something that is more like an SQL
join so that you could sort of dynamically create a datatable (or maybe a
dataview) that would consist of rows froim two or more tables snapped
together via their relationship(s). It's similar, but seems like it could be
easier for data retrieval.

-Ben
 
Ben,

AFAIK and understand you can you create one table using join from more
databasetables, however you cannot use that table in a dataadapter update.

Cor
 
If you seriously want to work with a joined table set, use a SQL view with
all the necessary joins. To keep the adapter update happy, you would then
create insted_triggers in T-SQL to handle the on update, edit and delete
request returning to the server.
 
Back
Top