|
-
Mar 20th, 2000, 06:16 PM
#1
Thread Starter
New Member
Hi,
I have two ADO recordsets (rs1 and rs2) with same fields. I want to append data of rs2 in rs1. One way is, I will fetch each record and each field and by using AddNew, Update method I can append data. but both recordset contains more than 20000 records each this takes lot of time to complete the task. Is there any effecient way to do it can we do bulk append?
Thanks in Advance.
-
Mar 20th, 2000, 07:13 PM
#2
Junior Member
Set your RS (just 1 RS is needed) to
"Select * From table1 Union Select * From Table2;"
Hope this helps.
-
Mar 20th, 2000, 07:54 PM
#3
Thread Starter
New Member
Solution which you are telling is correct but I don't want to requery the database cuz data which I fetch in the recordsets may get changed. I don't want to requery on the database. I just want to append records from one recordset to another.
Thanks.
-
Mar 20th, 2000, 08:19 PM
#4
Junior Member
I don't know then - but I do know that when you change a recordset you are effectively changing the database - so it should not matter if you requery the db - the data should still be accurate. If you do find a solution post it out of interest.
-
Mar 23rd, 2000, 05:46 PM
#5
Lively Member
Append Recordset To Another Table
Private Sub Command1_Click()
On Error GoTo Err_AppendData
Dim dbs As Database
Set dbs = OpenDatabase("c:\TestAppend.mdb")
dbs.Execute "INSERT INTO Temptable SELECT * " _
& "FROM Table1;"
dbs.Close
Exit_AppendData:
Exit Sub
Err_AppendData:
MsgBox Err.Number & " : " & Err.Description
Resume Exit_AppendData
End Sub
-
Mar 23rd, 2000, 09:03 PM
#6
Thread Starter
New Member
Thanks for reply,
But I don't want to execute any "SELECT" query from the database. I want to only append records in the memory. Let's consider there is no database exists and I had append all records manually. No active connection is present.
-
Jun 21st, 2000, 03:44 PM
#7
Lively Member
Aahhh, same question, hoped to find the answer here.
I also want to append a recordset to another recordset, both disconnected from the database, just in memory on the clients machine.
Did someone already find a solution? (I'm sure someone did, just need to find this person or find the solution myself)
Fedor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|