There is a table with 4 columns and 10 rows, how to write the
script to display the first column records using qtp? can
anybody help me with script?

Answer Posted / manas

Dim Conn, rs, ListOfRecords, x
' Connect to the Microsoft Access Database by createing a
object
set conn=CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/DataBase1.mdb" ' ex: Name of DataBase is
DataBase1.mdb

' Retriving data from Access using the SQL Query
' Column_name1 - Suppose first column
' Table - Suppose Name of Table
set rs=CreateObject("ADODB.recordset")
rs.Open "Select Column_name1 from Table", conn

for each x in rs.Fields
ListOfRecords = ListOfRecords & x.Column_Name1 & vbCrLf
next

MsgBox ListOfRecords

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is the qtp course will help to create a virtual object?

1518


How to test the login page in different ways in automation testing and i need code?

1350


How the exception handling can be done using quicktest professional (qtp)?

573


what is object and child object.. explain ..if possible give some example for better understanding ..

1533


What does it mean when a check point is in red color? What do you do?

570






What is checking bitmaps?

556


how to disable the pop ups through QTP using a script

1733


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format. Hence, if possible, kinldy mail PDF file to my mail-ID: sushmapokhriyal79@gmail.com

1500


How to export quicktest professional (qtp) results to an .xls file?

604


What is the syntax to call one action in another?

557


Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

1454


If u r using library files (Instead of Check Points) , How do u do bitmap check ?

1457


How to analyzing test results using quicktest professional (qtp)?

591


breef description of batch testing ?

1711


In qtp, how you can use xpath to identify objects?

618