assign table values to recordset and update with another recordset using vb6 -


Hi,

I want to assign database table column to record in vb6. And I want to update them with those values ​​in my other record set. Is this possible?

>

An ADODB record set is not a mirror of a database table RecordSet contains the query that you provide, depending on that query. Therefore, in order to load the data from the database into the records, you need to execute a query. It can be done in two ways.

  1. Use the ADODB.Connection.Execute method and set your record set for the result.

    Dim selection connection as new ADODB - dim rs as ADODB.Recordset - con.ConnectionString = "some connection string"
    con.Open
    set rs = con .execute ("select from * table")

  2. Create an ADODB.Recordset object, specify the connection and then call the Open method with a query.

    Dim selection as new ADODB.Connection - Dim rs as new ADODB.Recordset
    con.ConnectionString = "Connection String" = con.Open
    Set rs.ActiveConnection = Con = rs Open "Select * from the table"

You can be as simple or complex as you want. Query can ask for fields from multiple tables and the results in the record set will still be the result of the query, although you will not be able to tell which table field is there.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -