What's Inside a DataRelation?

M

Mathew Weaver

Does anyone know what data structure and/or method a DataRelation provides
to implement DataRow.GetParentRow() and DataRow.GetChildRows()?

Doing some testing, the DataRow.GetParentRow() method is much faster than
using DataTable.Select() on the parent table to find the parent row. And
DataRow.GetChildRows() is much faster than using DataTable.Select() on the
child table to get the child rows.

What does DataRelation provide that makes this so much faster?
 
D

Dmitry Arefiev [gs-soft.ru]

Hello !

Both methods uses index to find a range of rows or single row.
Select method may use index, but it will depend on some
conditions.

Regards,
Dmitry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top