Q: Finding Records
From: Geoff Jones (nodamnspam_at_email.com)
Date: 01/25/05
- Next message: Marc Doolittle: "Re: Jet OLEDB: Database Locking Mode"
- Previous message: Andy Willis: "Jet OLEDB: Database Locking Mode"
- Next in thread: Frank Hickman [MVP]: "Re: Finding Records"
- Reply: Frank Hickman [MVP]: "Re: Finding Records"
- Reply: Stephen Howe: "Re: Finding Records"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 Jan 2005 14:31:23 -0000
Hi
Can anybody give me some advice on the following?
Suppose I have two tables: A and B. There is a one to many relationship
between A and B. I would like to find all the child rows in B for a given
row in A. Then, from these returned rows, I would like to find all the rows
which satisfy a given criteria.
With me so far? :)
I know how to create a relationship between A and B, and have been able to
get the child rows. However, the only way I can think to find the rows in
the last step is to go through every row and check the criteria to see if it
is satisfied:
For Each row As DataRow In ChildRowsReturnedByRelationship
If row.Item("Name") = "Geoff" Then
' Do something
EndIf
Next
which works for me but I don't feel it is as good or efficient as it could
be.
I know that for a DataTable, you can use something like "FindRows". Is there
an equivalent I could use for some returned rows e.g. something like:
ChildRowsReturnedByRelationship.FindRows("Geoff")
???
Thanks in advance
Geoff
- Next message: Marc Doolittle: "Re: Jet OLEDB: Database Locking Mode"
- Previous message: Andy Willis: "Jet OLEDB: Database Locking Mode"
- Next in thread: Frank Hickman [MVP]: "Re: Finding Records"
- Reply: Frank Hickman [MVP]: "Re: Finding Records"
- Reply: Stephen Howe: "Re: Finding Records"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|