Try this
While (NOT rcRecordSet.EOF)
Expected_Data0 = "0"
Expected_Data1 = "1"
v_DBData = rcRecordSet.fields("ColumnName")
If v_COUNTER = "0" Then
If Expected_Data0 = Cstr( v_DBData) Then
Reporter.ReportEvent micPass, "Result- " ,
"ColumnName values are same in DataBase: " & Cstr( v_DBData) & " and
Expected is " & Expected_Data0
Else
Reporter.ReportEvent micFail, "Result "
, "ColumnName values are different in DataBase:" & Cstr( v_DBData) & " and
Expected is " & Expected_Data0
End If
Else
If Expected_Data1 = Cstr( v_DBData) Then
Reporter.ReportEvent micPass, "Result- " ,
"ColumnName values are same in DataBase: " & Cstr( v_DBData) & " and
Expected is: " & Expected_Data1
Else
Reporter.ReportEvent micFail, "Result "
, "ColumnName values are different in DataBase:" & Cstr( v_DBData) & " and
Expected is: " & Expected_Data1
End If
End If
Wend
Thanks,
Anil.
On Thu, Jul 2, 2009 at 1:14 AM, Judy <[email protected]> wrote:
>
> How can i compare two rows of datatable in QTP
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---