Results 1 to 4 of 4

Thread: one recordset to another

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    Philippines
    Posts
    101

    one recordset to another

    hi,

    is there a better way of copying records from a recordset to another recordset aside from using this code:

    do while not rsOne.eof
    rsTwo.addnew
    rsTwo!FieldName1 = rsOne!FieldName1
    .
    .
    .
    rsOne.MoveNext
    Loop

  2. #2
    Addicted Member E-Link's Avatar
    Join Date
    Nov 2001
    Location
    INA
    Posts
    242
    if Table2 has same structure as Table1 , u can do it with Sql Statement , like this :
    Code:
    SQL = "INSERT INTO Table2 SELECT * FROM Table1"

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    Philippines
    Posts
    101
    im copying from a recordset not table. my recordset contains filtered records from a table.

  4. #4
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Talking Oooops, there goes the biscuits...

    Code:
       Set adoRecordset2 = adoRecordset1
    Where adoRecordset2 & adoRecordset1 are ADODB.Recordset

    Why would you want to copy a recordset to another?

    E-Link: That plane didn't exist. The flight number is made up

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width