Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Master-Detail and Datagrid

Status
Not open for further replies.

tEkHEd

IS-IT--Management
Jan 29, 2003
261
GB
Hello..

I am trying to build an in memory DB for an application that reads from Active Directory.

The app is going to be used to manage Applications and their dependancies.

To achieve the link between app and its dependancies I have created a DataSet consisting of 2 tables and 2 relationships

My tables are:

tblApps
tblApp_mm_Dep

My relationships are:

relParentToChild
relChildToParent

My application table is constructed as:

AppID
AppName
DN
License

My ManyToMany table is:

ID
ParentID
ChildID

My Relationships are:
relParentToChild - tblApps.AppID on tblApp_mm_Dep.ParentID
relChildToParent - tblApp_mm_Dep.ChildID on tblApps.AppID

this gives me my reflexsive many to many relationship.

When i have tried to bind to a datagrid I can see the applications and their dependancies, however the dependancies can only be seen when drilling down through the many to many joining table.

Is there a better way that I can display this data? I need the view source to include any nested dependancies, and be able to filter the shown rows according to the applications that will be included in a business layer..

I was thinking that the best approach would be to use a DataView, however these don't seem to be as configurable as a native SQL view as they only seem to be able to bind to a single table instance??

I could create a view dynamically by using a dataadapter of some description, however I cannot see any examples of how to connect to and query an in-memory dataset (i.e. I have no SQLConn 9or equivalent))

Can anyone help please?

Ta in adv...
 
You can't connect to and query a DataTable in a DataSet. You are on the right track with the DataView idea, but I think that you might have to actually requery the database and do the join in your SQL, rather than in a relation among DataTables. Here is a link to a thread that discusses something similar, and it may get you going:

thread796-905875


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top