You can put all data in one row in data table only marked columns as "Fname_Dbase' and "Fname_Appl" and then compare. It is easier then compare two rows.
Ludmila. > Date: Sat, 4 Jul 2009 14:59:20 -0700 > Subject: Re: Compare two rows > From: [email protected] > To: [email protected] > > > 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 > > > _________________________________________________________________ Windows Live™ SkyDrive™: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
