G
Guest
Hi;
Why don't I get the data rows that I want when I nest two data readers ?
I have two connections and I execute two reads one nested inside the other.
I am trying to use the key fields of the outer read/TABLE to look up
specific records in a second table inner read.
Then inner reader just goes through the entire table.
Example:
open conn1
open conn2
selrecs1 = " Select 1, 2, 3 from a"
hold1 = 1
hold2 = 2
selrecs2 = " Select b.3, b.4, b.5 from a, b where b.3 = '" & hold1 & "' and
b.4 = '" & hold2& "'
while rdr1.read
var1 = rdr1.getValue(0)
var2 = rdr1.getValue(1)
while rdr2.read
var3 = rdr2.getvalue(0)
var4 - rdr2.getvalue(1)
' I NEED ONLY MATCHED RECORDS RETURNED WITH THIS READER
wend
wend
close conn1
close conn2
Thanks for your insights
Why don't I get the data rows that I want when I nest two data readers ?
I have two connections and I execute two reads one nested inside the other.
I am trying to use the key fields of the outer read/TABLE to look up
specific records in a second table inner read.
Then inner reader just goes through the entire table.
Example:
open conn1
open conn2
selrecs1 = " Select 1, 2, 3 from a"
hold1 = 1
hold2 = 2
selrecs2 = " Select b.3, b.4, b.5 from a, b where b.3 = '" & hold1 & "' and
b.4 = '" & hold2& "'
while rdr1.read
var1 = rdr1.getValue(0)
var2 = rdr1.getValue(1)
while rdr2.read
var3 = rdr2.getvalue(0)
var4 - rdr2.getvalue(1)
' I NEED ONLY MATCHED RECORDS RETURNED WITH THIS READER
wend
wend
close conn1
close conn2
Thanks for your insights