compare two record sets in vb6 -


Hello,

I have two record sets in r1 and rs2 in vb6. I want to compare each record in each record in RS2. If rtn (column) in rt1 is same in rsn in rs2. Then set date = now more claims = c.

This is what I want to do. How to compare RS1 in RS1 in each row in RS2. Help me pls

On both records, loop in an internal and external loop similar to the following:

  rs1.MoveFirst while rs1.EOF rs2.MoveFirst not rs2.EOF 'rs2.EOF' Otherwise its comparison here 'if rs1 ("colum"). Value = RS2 ("column"). If the 'Other fields end', then rs2.MoveNext Wend rs1.MoveNext Wend  

If you need to compare each field, then you can iterate on fields similar to the following It assumes that the same order in the recordset has the same order as

  i as rs1.Fields.Count -1 if rs.fields (i) .value = rs2 .fields (i) .value then 'DO other stuff' end if next I  

Comments

Popular posts from this blog

MVP, design question -

excel - Populate list via a bi-Condition -

iphone - How do I make a UIPickerView in a UIActionSheet -