|
-
Aug 18th, 2006, 12:29 AM
#1
Thread Starter
Lively Member
code for data comparing
Hi All
I want to make a code which is used to compare two tables data and difference add in third table called result.but I could not complete it sucesscessfuly Please check the problem.
Dim rs As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
rs.Open "select * from texcel", con
rs2.Open "select * from result", con, adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
rs1.Open "select * from WMS where category='" & rs!category & "' and item='" & rs!Item & "'", con
If rs1.RecordCount = 0 Then
rs2.AddNew
rs2!category = rs!category
rs2!Item = rs!Item
rs2!remarks = "Item not found in WMS"
rs2.Update
End If
rs1.Close
rs.MoveNext
Loop
MsgBox "Data Matching is complete", vbInformation + vbOKOnly, "Jafri Soft"
-
Aug 18th, 2006, 12:40 AM
#2
Re: code for data comparing
but I could not complete it sucesscessfuly
Your code looks complete to me?
What is the problem? Do you get any errors?
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
|