QTP Forums

Full Version: MDB result to compare against QTP Output
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am new to QTP and to VBscriping as well ..i need help on the below.

The below code only retrieves the first value in the first row, In what way can i retrieve data in sequence (one row after the other) from a table, in access database and compare against an output value ( from a Webedit object on the GUI ) for different employees.

Here is a sample of the code

dim objDB
dim objRS
dim intCounter

' create a database and recordset objects
Set objDB = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.RecordSet")

' configure the connection
objDB.Provider="Microsoft.Jet.OLEDB.4.0"
objDB.Open "c:\MyTestDatabase.mdb"

' count the number of records in the employee table
objRS.Open "SELECT emp from Employee" , objDB

' HOW DO I loop and GET DATA IN A SEQUENCE ONE AFTER THE OTHER AND COMPARE AGAINST MY OUTPUT VALUE IN QTP

' destroy the objects
Set objDB = Nothing
Set objRS = Nothing
sriqa2009 - Please do not create multiple threads for the same query.

Thread Closed.
Reference URL's