I have 2 recordsets, say one is "Adodc1" and the other is the normal recordset say "rs".
At a particular point of time the Adodc1 will have say 10 records. The columns in Adodc1 are name and comments.
Apple 500 pounds
Orange 200 pounds
Pear 600 pounds
In the other recordset, I have simlar names in addition to other names
Apple 585 pounds
Mango 100 pounds
These are dummy figures and records, actually it's a huge recordset consisting of company name and its related comments.
The Adodc1 is bound to a Datagrid and the other recordset is made at runtime reading from an other table.
What I wish to do:-
If the rs recordset consists of names matching the adodc recordset the adodc should be overwritten by the value of comment in rs recordset, and if the adodc does not have the value in rs , then that value will be inserted in Adodc recordset.
What I am doing right now :-(which i feel is not the best option)
I am using the For loop to move thru the adodc recorset and using an If..end if Loop within that..and then again a for..next loop...
(I find this very cumbersome, for the fact that i am quering a huge table)
i tried using Adodc1.recordset.Find "name='Apple'" and simlar things.
Hope somebody can tell me an easy and not so cumbersome method!