D
DDW
I've got a dataset (ratesds2) containing multiple relational tables
(3) for which I'd like to find a single child record.
Table(1) contains a single record for each product and table(2)
contains details for the product. The product details table is
"nested" based on the productID. Table one has a single key field
(productID) and table two has two key fields with productID from table
1 being one of the two and the other a unique product attribute key.
Dataset is correctly defined with the two primary key fields in table
2.
All I want to do is retrieve a specific row from table 2 given the two
key fields as follows and put the value of a single field into string
variable;
Sample Code
-----------------------------------------------
Dim filterstring As String = "productid = '123'"
Dim productdetailsview As New DataView
productdetailsview = ratesds2.Tables(2).DefaultView
productdetailsview.RowFilter = filterstring
Dim foundRowsc() As DataRowView = productdetailsview.Find(New
Object() "123", "C"})
dim attribiute_c as string = foundRowsc(0)("Details")
This doesn't work. Any ideas?
(3) for which I'd like to find a single child record.
Table(1) contains a single record for each product and table(2)
contains details for the product. The product details table is
"nested" based on the productID. Table one has a single key field
(productID) and table two has two key fields with productID from table
1 being one of the two and the other a unique product attribute key.
Dataset is correctly defined with the two primary key fields in table
2.
All I want to do is retrieve a specific row from table 2 given the two
key fields as follows and put the value of a single field into string
variable;
Sample Code
-----------------------------------------------
Dim filterstring As String = "productid = '123'"
Dim productdetailsview As New DataView
productdetailsview = ratesds2.Tables(2).DefaultView
productdetailsview.RowFilter = filterstring
Dim foundRowsc() As DataRowView = productdetailsview.Find(New
Object() "123", "C"})
dim attribiute_c as string = foundRowsc(0)("Details")
This doesn't work. Any ideas?