How to retrieve the data from database?

Answer Posted / shyam.meghansh

Dim Dsn_conn,rs

Set objConnection=Createobject("ADODB.Connection")
Dsn_conn= "DSN=QT_Flight32;DBQ=C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight32.mdb;Driver=C:\WINNT
\system32\odbcjt32.dll;DriverId=281;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;"
objConnection.Open(Dsn_conn)
Set rs=CreateObject("ADODB.RecordSet")

Set rs=objconnection.execute(" select flight_Number from
Flights where flight_Number>20330")

rs.MoveFirst

While Not rs.EOF
Msgbox rs.fields.item("flight_Number")
rs.movenext
Wend


.................Any more question mail me
testingwithshyam@gmail.com

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is Client side image is preferred over server side image?

1435


hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....

2427


What is an expert view and keyword view?

565


Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?

613


What are the features of quick test pro(qtp)?

526






Explain more about the Test Fusion Report of QTP?

601


Explain in brief about the quicktest professional (qtp) automation object model?

559


How can I import environment from a file on disk?

531


Get the count of files of similar types from a folder.

967


What is the use of sendkeys and what are send keys

1943


What is quicktest professional (qtp)?

561


Hi, I am supposed to automate mainframe application through qtp. I do not know how to start abt it. Can you plz help me in first initializing the process or do you anybody have a guide book or a link which guides me through the process of automating the mainframe applications and things involved in it.

6651


What are main panes available in qtp test browser?

528


I need to obtain the parent of an object programatically, so if I have: winButton("aButton") I need to obtain the parent part: window("Window1").Dialog("Dialog1") so I can programatically create a string of the full name of the object to call it with an execute statement in QTP I would like to use something like: part[1] = "window(""Window1"")" part[2] = "dialog(""Dialog1"")" so I can do: exeLine = part[1]&"."&part[2]&"."&"winButton(""aButton"")" Execute exeLine Apart from keeping a record of the window/dialog hierarchy is there a parent or path function/ command Thanks Adrian

1565


How can I check if a environment variable exist or not?

534