by Manohar Dung Dung (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 3rd June 2006
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Making temporary table and gathering specific records from main table
Set rst = New ADODB.Recordset
If rst.State Then rst.Close
rst.Open "select * from master_mainstock", cnn, 1, 3
Set rst_temp = New ADODB.Recordset
If rst_temp.State Then rst_temp.Close
rst_temp.Open "select * from temp_mainstock", cnn, 1, 3
For i = 1 To rst.RecordCount
If temp_date = rst.Fields(0) Then
rst_temp.MoveFirst
For j = 1 To rst_temp.RecordCount
If rst_temp.Fields(0) = rst.Fields(1) Then
rst_temp.Fields(2) = rst.Fields(2)
rst_temp.Fields(3) = rst.Fields(3)
rst_temp.Fields(4) = rst.Fields(4)
rst_temp.Fields(5) = rst.Fields(5)
rst_temp.Fields(6) = rst.Fields(6)
rst_temp.Update
check_date = True
End If
rst_temp.MoveNext
Next j
End If
rst.MoveNext
Next i
Set rst = Nothing
Set rst_temp = Nothing
No comments have been posted about Making temporary table and gathering specific records from main table. Why not be the first to post a comment about Making temporary table and gathering specific records from main table.