A
Alex Ayzin
Hi,
I have a problem that might be easy to solve(possibly, I've just overlooked
an easy solution). Here we go:
I have a dataset with 2 datatables in it. Now, I need to do the following:
if ds.table(0).rows(0).item("col1") = ds.table(1).rows(0).item("col2") then
txtResult.text = ds.table(1).rows(0).item("col3")
end if
The problem is, that possible match exists in the database, but not
nessasarily at Rows(0). It could be at different index. But how to actually
get to the correct index??
I looked into the database, and in my case first possible match is at index
Row(1) so the correct version'd be like this:
if ds.table(0).rows(1).item("col1") = ds.table(1).rows(1).item("col2") then
txtResult.text = ds.table(1).rows(1).item("col3")
end if
But of course, there is no way to know in advance, what index to use, so I'm
lost a bit.
Basically, I have a couple of ways of doing it. I could use Select or Find
methods of datatable object to apply filtering on the datatables. But, the
problem is that filtering needs to be applied on 2 different tables of the
dataset, but I know how to do it for 1 datatable only. I need to merge 2
datatables into dataview and apply a filter. But how to do it? Anyway, if
anyone has any ideas, so please share it with me. Thanks a lot in advance,
--Alex
I have a problem that might be easy to solve(possibly, I've just overlooked
an easy solution). Here we go:
I have a dataset with 2 datatables in it. Now, I need to do the following:
if ds.table(0).rows(0).item("col1") = ds.table(1).rows(0).item("col2") then
txtResult.text = ds.table(1).rows(0).item("col3")
end if
The problem is, that possible match exists in the database, but not
nessasarily at Rows(0). It could be at different index. But how to actually
get to the correct index??
I looked into the database, and in my case first possible match is at index
Row(1) so the correct version'd be like this:
if ds.table(0).rows(1).item("col1") = ds.table(1).rows(1).item("col2") then
txtResult.text = ds.table(1).rows(1).item("col3")
end if
But of course, there is no way to know in advance, what index to use, so I'm
lost a bit.
Basically, I have a couple of ways of doing it. I could use Select or Find
methods of datatable object to apply filtering on the datatables. But, the
problem is that filtering needs to be applied on 2 different tables of the
dataset, but I know how to do it for 1 datatable only. I need to merge 2
datatables into dataview and apply a filter. But how to do it? Anyway, if
anyone has any ideas, so please share it with me. Thanks a lot in advance,
--Alex