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

Define Canvas view of UFT?

801


how can we preform retesting(DATA driven test) using function please gine the code for loginpage

2521


How to analyzing the checpoint results?

732


How to use debug tools?

2435


Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance

1750


Suggest and Define a solution for an application whose objects are not recognized by UFT?

873


Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?

1642


Explain object spy in qtp.

805


I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2

1772


Hi, how can we check or avoid the memory leakage in QTP9.2?

1864


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

1284


How to find Operating system information using QTP script?

766


QTP 10.0 is not identifying web objects for IE 8.it is identifying like winObject.I installed HP patch QTPWEB_00037.Still getting issue

5878


when a test case is written how u test using qtp

1895


what is the difference between development and testing

2973