I want to compare the data from application with database.

I am capturing the data from application in ouput checkpoint and
storing it in runtime datatable.

I also import the Db data to the runtime data table.Now, I want to
compare these data.I need code to compare these two rows in the data
table.

Thanks,
Judy

On Jul 2, 8:57 am, Anil Veeramachaneni <[email protected]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to