|
-
Nov 21st, 2000, 05:30 PM
#1
Thread Starter
Lively Member
Hi,
Here is an interesting question.Can anyone tell me the solution to this..
if i have table1 with 5 rows, and table2 with 10 rows (similar table structure), thru coding how do i append all 10 rows to table1 ....
Interesting isn't it.Any help will be highly appreciated.
Regards
-
Nov 21st, 2000, 06:43 PM
#2
maybe more detailed information will help to get usefull answers. are you using a database (if so, which one) ...
best regards
Sascha
-
Nov 21st, 2000, 07:20 PM
#3
New Member
I never tested it out but this might be an idea. Maybe there is a better way.
Usage: AppendTable Table1, Table2
This should append Table1 onto Table2. If I did the code right, anyway.
Public Sub AppendTable(rs1 As ADODB.Recordset, rs2 As ADODB.Recordset)
Dim rc As Integer, i As Integer, j As Integer
rs1.MoveLast
rs1.MoveFirst
rc = rs1.RecordCount
For i = 1 To rc
rs2.AddNew
For j = 0 To rs2.Fields.Count - 1
rs2.Fields(j).Value = rs1.Fields(j).Value
Next j
rs2.MoveNext
Next i
End Sub
If this isn't what you are talking about let me know.
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
|