I want to assign database table columns to recordset in vb6. And i want update them with the values that i have in my another recordset. Is that possible?
How to assign the data from table to recordset?
vb6
I want to assign database table columns to recordset in vb6. And i want update them with the values that i have in my another recordset. Is that possible?
How to assign the data from table to recordset?
Best Answer
An ADODB recordset is not a mirror of a database table. The recordset contains whatever you want it to based on the query you provide it. So to load the data from the database into the recordset you need to execute a query. This can be done in two ways.
ADODB.Connection.Execute
method and set your recordset to the result.ADODB.Recordset
object, specify the connection and then call the Open method passing it a query.The query can be as simple or complex as you want it be. The query could ask for fields from multiple tables and the recordset will still contain the results of the query, however you won't be able to tell which table the fields are from.