Micro Focus QTP (UFT) Forums

Full Version: How to read expected row from MsAccess table in QTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
Is there any way to get the expected row data of MsAccess Table?
Eg. I want ot read 4th record of MsAcces table ABC.tbl

In WinRunner we use
db_get_row ( session_name, row_index, row_content );

Thanks in advance.
Dinesh
Hi,
The solution is as below.
Code:
set con = CreateObject("ADODB.Connection")       'Create MsAccess object
set rs =CreateObject("ADODB.recordset")               ' record set
con.provider = "microsoft.jet.oledb.4.0"
Sql = "Select City from Address"  'consider 5 records in table Address
rs.open Sql,con
' moves the control to 2nd record/row by following statement
rs.move(2)


Thanks
Dinesh
Hi,

One correction :
Please read comment as
' moves the control to 3rd record/row by following statement. The 0 is first record.


Note: I have found this solution by R&D.

Sorry for the trouble.

Thanks
Dinesh