Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to read expected row from MsAccess table in QTP
#1
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
Reply
#2
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
Reply
#3
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Searching for and selecting row in Datawindow zsl0009 0 3,176 08-04-2015, 01:02 AM
Last Post: zsl0009
  How to Verify Static Object Text which is changing Dynamically with Expected Result johnny77 0 3,687 06-25-2015, 11:32 AM
Last Post: johnny77
Wink How to read text in command prompt using QTP Sourabh146 1 7,105 11-30-2013, 11:02 AM
Last Post: ravi.gajul
  data sheet row count rushil 2 8,215 12-07-2012, 03:10 AM
Last Post: rushil
  Write Status of each row in DataTable dlaureano 2 4,123 11-29-2012, 05:53 PM
Last Post: dlaureano

Forum Jump:


Users browsing this thread: 1 Guest(s)