Question Query Question

sturner333

Member
Joined
Jun 20, 2008
Messages
9
Programming Experience
3-5
I am new to LINQ so I have what is probably a basic question. I have filled 2 datasets:



VB.NET:
Dim DB2SQLData As New db2SQLDataSet()

Dim sheet2Adapter As New db2SQLDataSetTableAdapters.Sheet2TableAdapter

Dim noteAdapter As New db2SQLDataSetTableAdapters.NotesTableAdapter

sheet2Adapter.Fill(DB2SQLData.Sheet2)

noteAdapter.Fill(DB2SQLData.Notes)



The sheet2 table has a one to many relation to the notes table.

I have dragged over the details of sheet2 on to a form and can query result to fill it:



VB.NET:
Dim sheet2 = From sheet1 In DB2SQLData.Sheet2 _

Where sheet1("Engr") IsNot DBNull.Value _

Select sheet1


I have also dragged the datagrid version of notes on to the same form.

What I would like to do is have the datagrid show all the notes related to the current sheet2 id.



Any hlep would be greatly appreciated.

Let me know if any more info is needed.

Thanks!
 
Back
Top